Unanswered: Number with leading alpha and padded zeros
I have a primary key in which
The first 3 letters are constant, "EDR"
The numeric portion is 8 digits
The number needs to pad with zeros from left to right if whatever is input is less than 8 digits
The total primary key length is 11 characters: 3 letters and 8 numbers.
How do I "make Access" do this? See concrete example below.
Right now I have an input mask of, "EDR"########!;0;_
Although the exclamation point forces the number to right justify, it still leaves blank spaces between the number and EDR if the number length is less than 8 digits. If my number is EDR00058427, how can I simply input 58427 and have the result not be EDR 58427, but EDR00058427?
Thank you for your tip! When I tried that, with a short number, 12345, expecting the left side of the number to pad with 3 zeros, preceded by EDR (that is, EDR00012345), I got the following error message:
"The value you entered isn't appropriate for the input mask '"EDR"00000000;0;_' specified for this field."
I finally got it! I had already established a relationship with the field as a text, so I couldn't do the number format. I tested it in another field though, and was able to replicate what you illustrated. Thank you for your help!
Last edited by dijilator; 07-01-14 at 17:29.
Reason: Was able to follow the instructions and resolve the issue.