Computer User
Computer User

Reputation: 2879

"Validation Rule" in MS Access for a string column for having only numeric digits

Is it possible to have a "Validation Rule" in MS Access for a column of text/string data type that allows only numeric digits? And a "Validation Rule" that allows only alphabets?

Upvotes: 0

Views: 9410

Answers (1)

Zaider
Zaider

Reputation: 2013

For a rule that will only allow numeric digits you can use. Is Null OR Not Like "*[!0-9]*" This will reject anything that is not a number. You can do the same thing with alpha characters with Is Null OR Not Like "*[!a-z]*"

Have a look at this link for more examples of what you can do with validation rules. If you are restricting a field to only allows numeric digits why not make the field numeric?

Upvotes: 8

Related Questions