Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Validation Rules

Status
Not open for further replies.

semaj21

Technical User
Jun 28, 2007
6
GB
Hello can anyone help me I am trying to make a validation rule for a field. It needs to be Between 0 And 28 OR "NA". When I use this in the validation property it works for the numbers and text but if you input say NJ or any other combination it issues a message box saying cannot evaluate the constraint, check Validation rules.
Am I missing some important syntax or something. Any help gratefully appreciated.
Barry
 
What exactly is allowed in the field? You say it must be between 0 and 28 or NA but then say that you wish to enter NJ, which does not match these rules.
 
Sorry if I was misleading, what I meant to say was if someone by error entered NJ or any other text but the required text NA Access returns the constraint error message.
Regards Barry
 
I'm baffled. How did you manage to get the control to work with a mixture of text and number values? Presumably the underlying field is text?
 
Hello again I have now resolved the issue thanks to a microsoft forum memmber. In the table field validation properties if you set the propertie to read "NA" OR LIKE Between "0" AND "28" the validation works. the quotation marks around the numbers was the key. Thanks for your help.
Regards Barry
 
Sorry you must leave out the LIKE statement.
Regards Barry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top