简体   繁体   中英

Microsoft Access Validation Formula

In ms access, how to write a validation formula for maximum of two letters in a field, first one being a letter and the second one being a number?

Eg A9 (allowed) B5 (allowed) BB5 (not accepted) DD (not accepted) 23 (not accepted)

I think setting the Validation Rule for the field at table level to the following should work:

IS NULL OR Like "[A-Z]#"

This will accept characters between A and Z for the first character and the # is to accept numbers in the second character space. I added the Is Null Or but you may want to remove it.

I hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM