Part I: Access Building Blocks
224
Now you know how to enter, edit, and save data in a new or existing record. In the next section,
you learn how Access validates your data as you make entries into the fields.
Understanding automatic data-type validation
Access validates certain types of data automatically. Therefore, you don’t have to enter any data-
validation rules for these data types when you specify table properties. The data types that Access
automatically validates include
l Number/Currency
l (^) Date/Time
l Yes/No
Access validates the data type when you move off the field. When you enter a letter into a Number or
Currency field, you don’t initially see a warning not to enter these characters. However, when you tab
out of or click on a different field, you get a warning like the one shown in Figure 6.7. This particular
warning lets you choose to enter a new value or change the column’s data type to Text. You’ll see this
message if you enter other inappropriate characters (symbols, letters, and so on), enter more than one
decimal point, or enter a number too large for the specified numeric data type.
FIGURE 6.7
The warning Access displays when entering data that doesn’t match the field’s data type. Access gives you
a few choices to correct the problem.
Access validates Date/Time fields for valid date or time values. You’ll see a warning similar to the
one shown in Figure 6.7 if you try to enter a date such as 14/45/05, a time such as 37:39:12, or an
invalid character in a Date/Time field.
Yes/No fields require that you enter one of these defined values:
l (^) Yes: Yes, True, –1, or a number other than 0 (which displays as –1)
l No: No, False, Off, or 0