MS Access Input Mask for Postcode
Is there a way to set an input mask in MS Access 2007 so that certain elements are optional? UK postcodes can be in a number of formats: LL00 0LL
or L00 0LL
or even LL00 L00LL
. For this particular assignment, I need only worry about the first two formats.
So, is there a way for me to set the input mask so that the first开发者_StackOverflow letter is optional?
Found an answer here and can just use the following:
LA0# oLL
A
defines a letter or digit and #
defines a digit or a space and removes the space when inserted into database.
Don't bother. Just use a text field and let the users insert the blanks. Put some code in checking for approriate alphabetic vs numeric characters.
The advntage is this approach will work for any country.
精彩评论