Which happens first AfterUpdate event of a form or Clicked event of a button on a form.
I have these codes on an AfterUpdate of a form:
If UpdateDone = True Then
UpdateDone = False
MsgBox "A record has been changed"
End If
I also have these on a save command button on a form:
If UpdateDone = True Then
UpdateDone = False
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
End If
When I close the form or moved to another form, the AfterUpdate event always fire although I already clicked the command button. How can I prevent the AfterEvent of a form from firing after clicking a command button.