Validation Rule in Access 2007

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!!!!
 
J

Jeff Boyce

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
 
M

Michael Gramelspacher

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!
 
M

Michael Gramelspacher

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

validation rule 1
Validation Rule/Text 1
Validation Rule 1
Validation Rule for maximum length 6
Validation Rule 2
email validation 6
Validate a Date 1
Validation Rule For only one Field 2

Top