473,385 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

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)

3 3998
Rabbit
12,516 Expert Mod 8TB
Undo your changes before trying to exit. Form.Undo Method (Access)
May 13 '15 #2
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
NeoPa
32,556 Expert Mod 16PB
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

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

Similar topics

0
by: Steve V | last post by:
I'm using Access 2000 to build a budgeting/tracking database. Can I make a validation rule (using VBA) that checks the data as if the record has already been added? I've got 5 tables (only the...
3
by: GGerard | last post by:
Hello In a text box, I would like the user to be able to enter only a number from 0 to 100 (including decimals Ex: 24.56) so I wrote this in the Validation Rule Propertie of the text box : >=...
6
by: Chuck | last post by:
A97. A database has a table: tblA which has a single text field, B. It is a primary field, indexed and no duplicates. It is used as a lookup for table tblC. A form based on tblA is used to add...
3
by: BrianB830 | last post by:
Hello all, I have a quick question regarding an MS Access database I'm creating. In the entity "ORDER", I have the attributes "Order Date" and "Delivery Date". I need to create a validation...
6
by: Oscar N. Goyee | last post by:
Well, its sames difficult for me; I love access so much and wish to make it perform extra task. I prepared an HTML form but can not connect it to my access table and so I think it is possible to...
10
by: morangolds | last post by:
Hi, I've been having a problem with C++ Windows Forms apps not "ending" when you close the form window. I've searched about this problem all over the place and most searches have lead me to...
10
by: gweasel | last post by:
What is the best way to apply a Validation Rule - or rather, where is the best place to put it? Is there an advantage to putting it on the field in the table vs setting the validation rule on the...
3
by: Alex.Sh | last post by:
How can i do something like this: i have a form with A percentage : ______ B percentage: ______ C percentage: ______ I want that the sum of these 3 fields *will never* be more than 100...
0
by: sari saji | last post by:
I have a form with numerous textboxes and I use the validating event to validate these items. If I want to close that form with the X button in the upper right corner of that window validation may...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.