minmay吧 关注:0贴子:16
  • 0回复贴,共1

是否保存当前记录

只看楼主收藏回复

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


IP属地:浙江1楼2015-09-02 09:45回复