Database Reference
In-Depth Information
Simple validation rules
The Field Validation group on the Fields tool tab includes two commands that provide
simple validation tests for fields without requiring you to build an expression:
Required By default, the Required property is set to No. Selecting the Required
check box in the Field Validation group sets this property to Yes, meaning that
every record must have an entry in this field; it cannot be blank. (A blank field is
called a Null ield .)
Unique By default, the Indexed property of all fields except AutoNumber fields is
set to No. This property has two Yes options:
Yes (Duplicates OK) This option is set if you select the Indexed check box in
the Field Validation group.
Yes (No Duplicates) This option is set if you select the Unique check box. (It is
set by default for AutoNumber fields.)
In both Yes cases, Access creates an index of the data in the field and its location,
similar to the index in a topic. The index speeds up data searching, because Access
can look up the location of the data in the index instead of searching the actual
database.
In terms of validation, selecting the Required check box causes Access to verify that
there is an entry in the field before it accepts the record. Selecting the Unique check
box causes Access to verify that no other record has the same value in the field before
it accepts the field entry.
TIP For Short Text, Long Text, and Hyperlink fields, the Required property can be
refined by the Allow Zero Length property. When this property is set to Yes (the
default), you can enter an empty string (two quotation marks with nothing between
them) and the field will not be considered blank. In other words, a required field can
be empty but not Null. The differentiation between Null and empty might seem silly,
but it becomes important if someone uses programming code to work with the data-
base, because some commands produce different results for Null fields than they do
for empty fields.
 
Search WWH ::




Custom Search