i am using this code but on press cancel Undo the Record
i don't want Undo when press the cancel button.
what is wrong in my code
If MsgBox("ok good bye", vbYesNoCancel, "Save Record?") = vbYes Then
DoCmd.GoToRecord , , acNewRec
ElseIf vbNo Then
DoCmd.RunCommand acCmdUndo
Else
End If