Cancelling a mask edit with a command button

sponge

Registered User.
Local time
Today, 14:26
Joined
Jul 12, 2005
Messages
44
Hi,

I have a form with a text box using a mask edit. How would I go about "exiting" the form by pressing on a button?

DoCmd.Close will not override any incorrect entries in the textbox - Is there a way to "undo" anything in the textbox so that I can exit the form after clicking on the command button.

DoCmd.Close will only close the form if the entered data in the mask edit is either correct or there is not data. (An error pops up if there is incomplete data in the textbox).
 
Last edited:
I think you want to undo an entry on a form. If this is true, you can ask the user to press: {Esc}. THis will undo the last entry, or {Esc}{Esc} to undo the entire record. Depending on the design of your form, you may also be able to use use the DoCmd.RunCommand acCmdUndo command in code on an Undo Button.
 

Users who are viewing this thread

Back
Top Bottom