标题:[求助]VB与access数据库的连接问题?
只看楼主
czh1899
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2007-10-18
 问题点数:0 回复次数:0 
[求助]VB与access数据库的连接问题?

谢谢各位兄台>我的代码如下:请指点一下.
Private Sub Command1_Click()
′添加记录
Data1.Recordset.AddNew
Data1.Recordset.Update
Data1.Recordset.MoveLast

End Sub

Private Sub Command2_Click()
′删除记录
Dim mag

If mag = vbYes Then
Data1.Recordset.Delere
Data1.Recordset.MoveLast
End If

End Sub

Private Sub Command3_Click()
End

End Sub

Private Sub Command4_Click()
′修改记录
Data1.Recordset.Edit
Data1.Recordset.Update

End Sub

Private Sub Data1_Validate(Action As Integer, Save As Integer)

Dim mag
If Save = True Then
mag = MsgBox("save?", vbYesNo, "save record")
If mag = vbNo Then
Save = False
Data1.UpdateControls
End If
End If

End Sub
谢谢各位兄台>我的代码如下:请指点一下.
Private Sub Command1_Click()
′添加记录
Data1.Recordset.AddNew
Data1.Recordset.Update
Data1.Recordset.MoveLast

End Sub

Private Sub Command2_Click()
′删除记录
Dim mag

If mag = vbYes Then
Data1.Recordset.Delere
Data1.Recordset.MoveLast
End If

End Sub

Private Sub Command3_Click()
End

End Sub

Private Sub Command4_Click()
′修改记录
Data1.Recordset.Edit
Data1.Recordset.Update

End Sub

Private Sub Data1_Validate(Action As Integer, Save As Integer)

Dim mag
If Save = True Then
mag = MsgBox("save?", vbYesNo, "save record")
If mag = vbNo Then
Save = False
Data1.UpdateControls
End If
End If

End Sub


搜索更多相关主题的帖子: 数据库 access 
2007-10-19 12:45



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-179016-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.369127 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved