validation for a field

S

sheena

I have a field called account number which can only consist of 9 characters
in total in most instances the account number consists of just 9 numbers but
rarely there are ones that have 8 numbers and an x on the end.
i have set the field type to "text" and i have set the validation rule as
<>9 and the validation text as must contain 9 characters.
when i test this with incorrect data it works well i get the relevant
message but wen i test this with borderline data e.g. 41256983x i get an
error message saying check constraints.
can anybody help me as i'm not sure where i'm going wrong i am fairly new to
access.
Thank you
 
J

Jeanette Cunningham

Sheena,
try this
Like "?????????"
Or
if you want to allow nulls
Is Null OR Like "?????????"

The above is 9 question marks

Jeanette Cunningham
 

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

Top