By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,045 Members | 1,339 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,045 IT Pros & Developers. It's quick & easy.

How can you force close a access form that has active validation rule

P: 7
Problem is when I type a lot of data in a form with validation rule and I changed my mind I want to close the form. However, it would not let me since the validation keeps on running. I can erase the data in text boxes but that will take long time just closing the form.
  • I wanted to have a close button that can override a validation rule without receiving to many error messages.
  • I can also build a clear button to delete the data text boxes and combo boxes, However i do not know how to do that in access code builder.
May 13 '15 #1

✓ answered by Rabbit

Undo your changes before trying to exit. Form.Undo Method (Access)

Share this Question
Share on Google+
3 Replies

Expert Mod 10K+
P: 12,430
Undo your changes before trying to exit. Form.Undo Method (Access)
May 13 '15 #2

P: 7
Thank you for that. What i did was mix undo command and close command in one macro so every data was erased before closing.
May 13 '15 #3

Expert Mod 15k+
P: 31,769
It's also interesting to know that the Escape key on a keyboard will, by default, undo your changes for you. It will undo the current control first if dirty and then (2nd Escape) undo the form if that's dirty. If the control isn't dirty then the first Escape will affect the current form instead, if dirty.
May 14 '15 #4

Post your reply

Sign in to post your reply or Sign up for a free account.