开发者

MS Access Input Mask for Postcode

开发者 https://www.devze.com 2023-01-27 11:46 出处:网络
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 ass

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消