Validation Rule in Access 2007

  • Thread starter Thread starter Lola
  • Start date Start date
L

Lola

How do I Create a Validation Rule that will allow only: AA, ET, CS, MT or SM
how do I write this in the Validation Rule Field and also in the Validation
Text field do I write exactly the wording I was given? e.g Valid entries for
this field are AA, ET, CS, MT or SM???? I really need help with this!!!!
 
Lola

Have you opened the form (assuming you're working in a form) in design view,
highlighted the control, then opened the Properties window and found
Validation Rule and Text?

I don't understand your question ("How do I") put a value in a property?
You type it in. If you're unsure of what a property is, does or requires,
you can click on the property and hit F1 for Access HELP.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
How do I Create a Validation Rule that will allow only: AA, ET, CS, MT or SM
how do I write this in the Validation Rule Field and also in the Validation
Text field do I write exactly the wording I was given? e.g Valid entries for
this field are AA, ET, CS, MT or SM???? I really need help with this!!!!

In your table set

Validation Rule: IN('AA','ET','CS','MT','SM')

Validation Text: Valid values for this field are AA, ET, CS, MT or SM!
 
How about using a combo box which will only allow those 5 choices?

A combo box on a form does not rule out a table validation rule. I would use both. Even if a user
were to enter data directly into the table, the rule could not be violated. Most likely I would
have a table of allowed codes, and the table would have a foreign key constraint with referential
integrity. That way the user could not enter a code that did not exist in the code table.
 
Back
Top