G
Guest
In new record, I enter all the fields, when I click on the next record arrow,
I get the message correctly - 'Do you want to Save Changes'
yes/no/cancel,
if I choose No, it clear all the fields, but I get the message again, can
someone help me in fixing this please?
I have the following code in my form -
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim ivalue
ivalue = Int(0)
ivalue = (MsgBox("Do you want to Save Changes? ", 547, "Update"))
If ivalue = 2 Then
DoCmd.CancelEvent
Exit Sub
ElseIf ivalue = 6 Then
[UPDATE_DATE] = Now
DoCmd.Save
Exit Sub
Else:
Form.Undo
Exit Sub
End If
Thank you,
-Me
I get the message correctly - 'Do you want to Save Changes'
yes/no/cancel,
if I choose No, it clear all the fields, but I get the message again, can
someone help me in fixing this please?
I have the following code in my form -
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim ivalue
ivalue = Int(0)
ivalue = (MsgBox("Do you want to Save Changes? ", 547, "Update"))
If ivalue = 2 Then
DoCmd.CancelEvent
Exit Sub
ElseIf ivalue = 6 Then
[UPDATE_DATE] = Now
DoCmd.Save
Exit Sub
Else:
Form.Undo
Exit Sub
End If
Thank you,
-Me