Database Reference
In-Depth Information
can still change the Date Due field value if you want. See the box above for more on auto-
enter calculations.
Figure 9-9. Auto-enter calculations let you protect data that's already in a field if you change the
field the calculation refers to. The verbose setting here, “Do not replace existing value of field (if
any),” is turned on for you. But if you want an auto-enter calculation to update any time the field(s)
it refers to changes, then uncheck this option.
Validate Data Entry with a Calculation
In Chapter 6 , you were introduced to several ways to validate data entered into a field. But
what if the Validation tab in the Field Options dialog box doesn't have a checkbox to meet
your needs? For example, you may want to use validation on the Zip Code field in the Cus-
tomers table. A valid U.S. Zip code has either five characters or 10 characters (in other
words, it can look like this: 95094, or this: 95054-2326). The closest validation option is
“Maximum number of characters”—close, but not right.
This situation is just the kind where the “Validate by calculation” option comes in handy.
Your job is to create a calculation with a Boolean result. It should return True when the data
is valid, and False otherwise. Here's how it works:
Search WWH ::




Custom Search