?
Solved

Validation Rule not working

Posted on 2006-07-04
3
Medium Priority
?
274 Views
Last Modified: 2008-03-03
I have 2 text boxes on a form.  One text box (B) has a validation rule (a DLookup formula) based off the value in itself and the other (A).  If I input values in A and B, the validation rule works.  However, if I go back and change the value in A that is not valid, nothing happens.  I want it to do some kind of requery where it would pick up this error in the validation rule in B.  I know requery works for Dlookups in control sources, but it does not seem to work for Validation Rules.  
0
Comment
Question by:mak345
  • 2
3 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 17036986
Hi mak345,
You validation rule in B is not going to trigger unless you change the value of B.

Sounds like you need to be doing something in the validation rule for A as well.

Pete
0
 

Author Comment

by:mak345
ID: 17037079
Is there any kind of code I can include to trigger the rule?
0
 
LVL 77

Accepted Solution

by:
peter57r earned 100 total points
ID: 17037691
Move your validation to code in the Form_Beforeupdate event procedure.
Then whatever chnages on the form the validation will be re-done.

Pete
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question