Microsoft Office Tutorials and References
In Depth Information
Finding the Right Tool to Keep Garbage Out
Finding the Right Tool to Keep Garbage Out
You can find many of the tools you need to keep garbage out in Table Design
view. You can use the data type to keep inappropriate data out of a field, and
many of the other field properties can work that way too. Field properties,
data type, and other field settings can prevent incorrect data from being
entered in datasheets and forms. Input masks and validation rules allow you
to be even more specific about the data allowed in a certain field.
Field properties appear in the bottom half of Table Design view; make sure
that you’re viewing the field properties for the field you’re working with by
clicking the field’s name in the top half of Design view. Field properties are
also covered in Chapter 2 of this minibook.
As you define a field in Design view, you can use the following field
properties to make sure that the right data gets into the right field:
Data Type: Use the correct data type to eliminate data of the wrong
type. Text (both Long and Short) types accept just about any input, so
use the Number, Date/Time, or Currency data type to screen out data
of a different type whenever appropriate. (See Chapter 2 of this
minibook for details on choosing the right data type.)
Although Data Type technically isn’t a field property, it appears in
Design view and is your first line of defense against incorrect data.
Field Size: This property limits the number of characters. If you know
that a field should never exceed four characters, for example, set Field
Size to 4. (See Chapter 2 of this minibook for more on field size.)
Format: This property makes the data look right. You can change text
to all caps or all lowercase, for example. Input masks, explained later in
this chapter, work with the Format field property. (See Chapter 2 of this
minibook for details on the Format field property.)
Input Mask: An input mask limits the information allowed in a field by
specifying what characters you can enter. Use an input mask when you
know the form the data should take — such as an order number that has
two letters followed by four digits. Phone numbers and zip codes are
other examples of fields for which input masks are useful. You find out
lots more about input masks later in this chapter.
Default Value: This property defines a value that appears by default
if no other value is entered. The default value appears in the field until
another value is entered.
Validation Rule: Data must pass a validation rule before it’s entered.
This property works with the Validation Text property rule. A
Validation Rule property that applies to a whole record is in the
property sheet. (You find more on validation rules later in this chapter.)
Validation rules are also available from datasheets.
Search JabSto ::




Custom Search