overiding vba code

rnickels

Registered User.
Local time
Today, 15:05
Joined
Dec 8, 2006
Messages
48
If I have a Cancel Command button on a players contact form.
Is there a way to overide the code that requires a data entry in the playername text box?

Basically I need a "way-out" for the user if they open this form by mistake and need to go back to the switchboard.

Right now I can exit the form Ok but in doing so I get 2 msg box one after the other due to my vba code on the on exit and before update and on exit event for the playername text box.

How can I prevent these msg boxes from appearing and close the form without a problem.

Thanks in advance,
Rob
 
Your form should have one way out. Be it the save or close button. This button dose your validation checking and catches any errors in the form and calls the user back if there is.
But you should also have a way out. A undo button, which dose just that in the code.

me.undo

Or if there has been an update, a delete query that will kill off the record if it was a mistake.

But you must only have one way out. Make sure the user can either "Save and Close" or "Undo" no other option.

Hope this helps :)
 

Users who are viewing this thread

Back
Top Bottom