Computer and Software Support


Validation rule and validation text examples 

Microsoft Access

Validation rule

Validation text

<>0

Enter a nonzero value.

>=0

Value must be zero or greater.

-or-

You must enter a positive number.

0 or >100

Value must be either 0 or greater than 100.

BETWEEN 0 AND 1

Enter a value with a percent sign. (For use with a field that stores number values as percentages).

<#01/01/2007#

Enter a date before 2007.

>=#01/01/2007# AND <#01/01/2008#

Date must occur in 2007.

<Date()

Birth date cannot be in the future.

StrComp(UCase([LastName]),
[LastName],0) = 0

Data in a field named LastName must be uppercase.

>=Int(Now())

Enter today's date.

M Or F

Enter M for male or F for female.

LIKE "[A-Z]*@[A-Z].com" OR "[A-Z]*@[A-Z].net" OR "[A-Z]*@[A-Z].org"

Enter a valid .com, .net, or .org e-mail address.

[RequiredDate]<=[OrderDate]+30

Enter a required date that occurs no more than 30 days after the order date.

[EndDate]>=[StartDate]

Enter an ending date on or after the start date.

 

Go Back

OR

Next Page

You can also

Return to Validation Rule