Database Reference
In-Depth Information
If a field or record doesn't satisfy the rule, Access rejects the entry and displays a message
explaining why.
TIP If you create a form by using one of the commands in the Form group on the Create
tab, the form's controls inherit any validation rules set for the corresponding fields in the
table on which the form is based. To prevent errors likely to be introduced by inexperienced
users of the form, you can add more restrictive rules to the form's controls, in the same way
you set rules for table fields. For information, search on validation in Access Help.
You create a validation rule by building an expression. In Access jargon, the term expres-
sion is synonymous with formula . It is a combination of operators, constants, functions, and
identifiers that evaluates to a single value. Access builds a formula in the format a=b+c ,
where a is the result and =b+c is the expression.
TIP In addition to using expressions as validation rules, you can use them to assign proper-
ties to tables or forms, to determine values in fields or reports, to define a set of conditions
that a record must meet to be included in the result of a query, and so on. For information
about queries, see Chapter 7, “Create queries.”
The expression you use in a validation rule combines multiple criteria to define a set of con-
ditions that a value in a field must meet in order to be a valid entry for that field. Multiple
criteria are combined using logical, comparison, and arithmetic operators. Different types
of expressions use different operators. The following are the most common operators:
Logical operators
And Selects records that meet all the specified criteria
Or Selects records that meet at least one of the criteria
Not Selects records that don't match the criteria
Comparison operators
< Less than
> Greater than
= Equal to
Search WWH ::




Custom Search