Microsoft Office Tutorials and References
In Depth Information
tblCustomer table records for area code 616
Figure 5-5
Note that Lucia removed the hyphens from the Phone field values; for example,
6168663901 in the first record used to be 616-866-3901. You’ll modify the Phone
field later in this tutorial to format its values with hyphens.
5. Close the qry616AreaCode query.
Next, Sarah asks you to create a query that displays information about customers in
Holland, Rockford, or Saugatuck. She wants a printout of the customer data for her
administrative aide, who will contact these customers. To produce the results Sarah
wants, you’ll create a query using a list-of-values match.
Using a List-of-Values Match in a Query
A list-of-values match selects records whose value for the designated field matches one
of two or more simple condition values. You could accomplish this by including several
Or conditions in the design grid, but the In comparison operator provides an easier and
clearer way to do this. The In comparison operator lets you define a condition with a list
of two or more values for a field. If a record’s field value matches one value from the list
of defined values, then Access selects and includes that record in the query results.
To display the information Sarah requested, you want to select records if their City
field value equals Holland, Rockford, or Saugatuck. These are the values you will use
with the In comparison operator. Sarah wants the query to contain the same data as the
qry616AreaCode query, so you’ll make a copy of that query and modify it.
To create the query using a list-of-values match:
1. Open the Navigation Pane, then in the Queries group on the Navigation Page,
right-click qry616AreaCode , and then click Copy on the shortcut menu.
2. In the Clipboard group on the Home tab, click the Paste button, type
qryHollandRockfordSaugatuckCustomers in the Query Name text box, and then
press the Enter key.
Search JabSto ::




Custom Search