You can limit the records
that you see in the result of a query by adding criteria to the query.
For example, you might want to see just the customers in California, or
you may just want to view the orders with sales greater than $500. You
can also view sales that occurred within a specific date range. Using
criteria, you can easily accomplish any of these tasks, and many, many
more!
Using an Exact Match Query
An exact match query
locates data only when there is an exact match with the criteria that
you enter. Here’s how you run an exact match query:
1. | Open the desired query in Design view.
|
2. | Select the cell on the Criteria row below the field for which you want to add the condition.
|
3. | Type the criteria you want to apply for that field. For example, type Sales Representative in the Job Title field (see Figure 1).
|
Click the Run button. The results of this query are shown in Figure 2.
Although Access is not
case sensitive, and you therefore can enter criteria in either upper- or
lowercase, the criteria you enter must follow specific rules. These
rules vary depending on the type of field the criteria applies to (see Table 1).
Table 1. Rules for Criteria, Based on Type of Field
Type of Field | Description |
---|
Text | After you type the text, Access puts quotes around the text entered. |
Number/Currency | You type the digits, without commas or dollar signs but with decimals, if applicable. |
Date/Time | You enter any date or time format. |
Counter | You type the digits. |
Yes/No | For yes, you type yes or true. For no, you type no or false. |