Professional Documents
Culture Documents
validation rule
validation rule
validation rule
Positive Is Null OR >= 0 Remove the "=" if zero is not allowed either. Is Null OR Like "####" For Text fields.
numbers only Positive numbers Is Null OR >= 0 Remove the "=" if zero is not allowed
No more than Is Null OR Between -1 And 1 100% is 1. Use 0 instead of -1 if negative only either.
100% percentages are not allowed. No more than 100% Is Null OR Between -1 100% is 1. Use 0 instead of -1 if negative
Not a future Is Null OR <= Date() And 1 percentages are not allowed.
date Not a future date Is Null OR <= Date()
Email address Is Null OR ((Like "*?@?*.?*") Requires at least one character, @, at least Email address Is Null OR ((Like "*?@? Requires at least one character, @, at
AND one character, dot, at least one character. *.?*") AND least one character, dot, at least one
(Not Like "*[ ,;]*")) Space, comma, and semicolon are not (Not Like "*[ ,;]*")) character. Space, comma, and semicolon
permitted. are not permitted.
You must fill Not Null Same as setting the You must fill Not Null Same as setting the
in Field1 field's Required property, but lets you in Field1 field's Required property, but lets you
create a custom message (in the Validation create a custom message (in
Text property.) the Validation Text property.)
Limit to specific Is Null OR "M" Or "F" It is better to use a lookup table for the Limit to specific Is Null OR "M" Or "F" It is better to use a lookup table for the
choices list, but this may be useful for simple choices list, but this may be useful for simple
choices such as Male/Female. choices such as Male/Female.
Is Null OR IN (1, 2, 4, 8) The IN operator may be simpler than Is Null OR IN (1, 2, 4, The IN operator may be simpler than
several ORs. 8) several ORs.
Yes/No/Null Is Null OR 0 or -1 The Yes/No field in Access does not support Yes/No/Null field Is Null OR 0 or -1 The Yes/No field in Access does not
field Null as other databases do. To simulate a support Null as other databases do.
real Yes/No/Null data type, use a Number To simulate a real Yes/No/Null data type,
field (size Integer) with this rule. (Access use a Number field (size Integer) with this
uses 0 for False, and -1 for True.) rule. (Access uses 0 for False, and -1 for
True.)