Ignore Before Update code if Delete

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have some Before Update code to make sure all the fields have been answered
before the user leaves the record.

However, if the user hits a custom Delete button, I would like to
override/skip the Before Update code.

What's the best way to handle this?

The Delete code is:

DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

Thanks.

Kurt
 
Hi Kurt,

Probably the simplest approach would be to call
Me.Undo
in the Delete button's Click event procedure.
 
Back
Top