谢谢各位兄台>我的代码如下:请指点一下.
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