force a sequence of events

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

Guest

My problem, If a user chooses to close a form before all the data is entered,
the form is closed, then is does it checks for form_before_update. This sub
will catch possible errors and alert the user, but after the alert is shown
the form is already closed. If the user was paying attention, they could go
back in and fix the errors. Can I make access perform the
"form_before_update" first before the form is closed, so I can abort the
close if there are errors?
 
Do you have in the Before update event

Cancel = True

when you want to stop the exit
 
I have
.....
docmd.cancelevent
exit sub
.....
when this event happens
 
Using Cancel = True in the before update event should stop update from
continue, so the form shouldn't close.
 

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

Back
Top