G
Guest
Can any body tell me how to set up a validation rule that allows me to only
enter two characters, six numbers and one character.
enter two characters, six numbers and one character.
pete said:Can any body tell me how to set up a validation rule that allows me
to only enter two characters, six numbers and one character.
Dirk said:Can any body tell me how to set up a validation rule that allows me
to only enter two characters, six numbers and one character.
If by "character" you mean a letter (A to Z), you could use this:
Like "[A-Z][A-Z]######[A-Z]"
Jamie Collins said:Dirk said:Can any body tell me how to set up a validation rule that allows me
to only enter two characters, six numbers and one character.
If by "character" you mean a letter (A to Z), you could use this:
Like "[A-Z][A-Z]######[A-Z]"
But it wouldn't prevent something like this:
CurrentProject.Connection.Execute "INSERT INTO Test VALUES
('AA######A');"
Better to use an 'ANSI-neutral' pattern e.g.
Like "[A-Z][A-Z][0-9][0-9][0-9][0-9][0-9][0-9][A-Z]"
http://www.govtalk.gov.uk/gdsc/html/frames/NationalInsuranceNumber-2-1-Release.htmFWIW I suspect there may be more validation required than suggested
(and the above pattern may not be appropriate to support older TN
numbers). See: