Cancel the Update Event

G

Guest

I have a form that requires data entry. One text box must have dated before
one can continue updating. I also have an "OK" command button and a "Cancel"
command button.

In the After Update Event is where I created code that pop ups a form
telling the user that this text box must have data. This After Update Event
continues to bring up this message if I hit the "Cancel" command button. How
do I cancel the After Update when the "Cancel" button is clicked.

Thanks for all the help!!!!

Rob
 
G

Guest

Move your code to the Before Update event and and the line
Cancel = True

Notice the naming of the events -- After Update is too late. It is already
happened, Before Update is where you check to be sure it is okay to continue.
 
G

Guest

That makes total sense. Thanks to both of you!!

Klatuu said:
Move your code to the Before Update event and and the line
Cancel = True

Notice the naming of the events -- After Update is too late. It is already
happened, Before Update is where you check to be sure it is okay to continue.
 

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