How do I format a field to be
10 characters or numbers
i.e. 112255353v or 5555551155 (for both these conditions)
The field should contain only 10 characters and it can be numbers or letters or both.
How do I format a field to be
10 characters or numbers
i.e. 112255353v or 5555551155 (for both these conditions)
The field should contain only 10 characters and it can be numbers or letters or both.
Make the field TEXT(10), and set its input mask to AAAAAAAAAA (10 times A).
But that will only affect data entered manually (through tables, queries or forms), NOT anything updated programmatically or using UPDATE or INSERT queries.
To better enforce your rules, you could set the Validation Rule of the field to:
Like "??????????"
or more precisely:
Like "[0-Z][0-Z][0-Z][0-Z][0-Z][0-Z][0-Z][0-Z][0-Z][0-Z]"
You should to use the text datatype with a max length of 10.
You could then set the minimum length using an input mask of "AAAAAAAAAA" forcing 10 characters. In input masks "A" or "a" represents either a letter or a digit so you are forcing the user to enter 10 characters of this type.
For a good explanation of what else you could achieve using input masks see http://office.microsoft.com/en-us/access-help/control-data-entry-formats-with-input-masks-HA010096452.aspx