Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim q As Integer
q = MsgBox("是否保存当前记录", vbOKCancel, "保存当前记录")
If q <> 1 Then
Me.Undo
End If
End Sub
Private Sub Form_BeforeUpdate(Cancel As Integer)
If MsgBox("数据被更改,是否保存?", vbYesNo) = vbNo Then
Cancel = True
End If
End Sub
Dim q As Integer
q = MsgBox("是否保存当前记录", vbOKCancel, "保存当前记录")
If q <> 1 Then
Me.Undo
End If
End Sub
Private Sub Form_BeforeUpdate(Cancel As Integer)
If MsgBox("数据被更改,是否保存?", vbYesNo) = vbNo Then
Cancel = True
End If
End Sub