Datasheet
Click the Criteria cell in the Invoice_Date column and type “4/20/2004”.
When you click out of that cell, you will notice that the date is now surrounded
by number signs, as shown in Figure 1-26.
When running the query, only results matching the two criteria (State =
“CA” and InvoiceDate = “4/20/2004”) are returned. Now look at using multi-
ple criteria for a single field. Suppose you want to bring in invoices for the data
11/19/2004 as well as 4/20/2004. You will want to add the new criteria line
below the existing criteria. This will have the effect of testing the records for
either one criteria or the other.
Because you want to limit your query to only results from California, you
must retype “CA” on your new Criteria line. If you don’t do that, the query
will think that you want all invoices from California on 4/20/2004 or invoices
from all states on 11/19/2004. The criteria lines will be evaluated individually.
Add “CA” to the State column underneath the previous one, as shown in Fig-
ure 1-27.
After running the query, you can see that your results have been refined
even further. You have only those invoices from California that were issued on
November 19, 2004 and April 20, 2004. To use multiple criteria in a query, you
are not limited to using the separate criteria lines. By using operators, you can
place your multiple criteria on the same line.
Figure 1-26 The number signs surrounding the date identify the criteria as being a
Date/Time data type.
34 Chapter 1
05_59978X ch01.qxp 12/1/05 7:46 PM Page 34