Microsoft Office Tutorials and References
In Depth Information
Chapter 5: Avoiding “Garbage In, Garbage Out”
Chapter 5: Avoiding “Garbage
In, Garbage Out”
In This Chapter
Using field properties to get the right data in the right fields
Defining how data in a field looks with input masks
Creating drop-down menus with lookup fields
Filtering data with validation rules
Let’s face it: If the data that goes into your database through tables
and forms is garbage, any output or analysis you do with queries and
reports will give you garbage too. Fortunately, Access offers lots of tools to
help you make sure that the data that goes in each field is the data that’s
supposed to go in that field. We’re talking about preventing mistakes as
data is entered, of course. If someone is purposefully entering erroneous
data, these tools may not help much (although we can help you get Access
to reject inappropriate data)! Some of the Access features that we discuss
in this chapter are described in other chapters, but they deserve a mention
here too; the rest are exclusive to this chapter.
Find the tool you need to keep your data clean. The options for each field
that you see in Table Design view generally define what you want to be
entered. (If you want no more than six characters of text, for example, you
can define the field size and the data type.) You can also use Table Design
view to format an input mask, which defines a pattern that data in the field
must follow, such as two characters followed by a dash and four numbers.
The validation rule allows you to specify a rule in the form of an equation
that data has to meet. You can even use a validation rule to make sure that,
for example, the shipping date comes after the order date. If a field’s data
should always come from an existing list or table (orders should contain
only products you actually sell, or addresses should contain only valid state
codes), you can create a lookup field. Read on to figure out what your
database needs.
If you don’t find the tool you need in this chapter, you may want to check
out Books VI and VIII, which cover more-advanced tools: macros and Visual
Basic for Applications (VBA) programming.
Search JabSto ::

Custom Search