Ignore Before Update code if Delete

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
 
J

John Nurick

Hi Kurt,

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top