validation for a field

  • Thread starter Thread starter sheena
  • Start date Start date
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
 
Sheena,
try this
Like "?????????"
Or
if you want to allow nulls
Is Null OR Like "?????????"

The above is 9 question marks

Jeanette Cunningham
 
Back
Top