Datasheet
Filtering query results
Next, you examine how you can filter the query output so that you retrieve
only specific records to analyze. In Access, this filter is also called Criteria. You
can see the Criteria section for each column added in your QBD. This is where
you will enter the value, or values, for which you would like to query. When
entering a value in the Criteria section, all records that match it are returned in
the query output. When entering text, you must enclose the text string with
quotation marks. You could either place them there yourself or type your text
and click another part of the QBD to have the quotation marks placed auto-
matically for you.
Suppose, for example, your manager wants to see the list of customers from
California. Because California is designated by the abbreviation “CA” in the
table, that is exactly what you will type in the Criteria section of the “State”
column, as shown in Figure 1-21.
Now click the exclamation icon to rerun the query. You will notice first off
that fewer records are returned. This is obvious from looking at the Record
Selector at the bottom of the query output window. A quick scan of the results
verifies that, indeed, only records with “CA” in the State column were
returned, as shown in Figure 1-22.
TIP You can sort and filter query results just as if they were a table. Simply
right-click the query results cell or column and the same options that appeared
for tables will also appear.
Figure 1-21 The Criteria section is where you will
type in the value for which you want to filter the data.
30 Chapter 1
05_59978X ch01.qxp 12/1/05 7:46 PM Page 30