Microsoft Office Tutorials and References
In Depth Information
• What are the names of Belmont Landscapes’ customers? The customer name is either
the company name for nonresidential customers or the last and first names for residen-
• What is the customer information for customers in a particular city? For this query, the
user needs to be able to specify the city.
Next, you will create the queries necessary to answer these questions. Taylor wants to
view the records for all customers located in the 616 area code. She plans to travel to this
area next week and wants to contact customers ahead of time to schedule appointments. To
answer Taylor’s question, you can create a query that uses a pattern match. A pattern match
selects records with a value for the designated field that matches the pattern of the simple
condition value, in this case, customers with the 616 area code. You do this using the Like
The Like comparison operator selects records by matching field values to a specific
pattern that includes one or more of these wildcard characters: asterisk (*), question mark
(?), and number symbol (#). The asterisk represents any string of characters, the question
mark represents any single character, and the number symbol represents any single digit.
Using a pattern match is similar to using an exact match, except that a pattern match
includes wildcard characters.
To create the query, you must first place the tblCustomer table field list in the Query
window in Design view.
To create the new query in Design view:
1. Close the tblContract table, and then click the Shutter Bar Open/Close Button
at the top of the Navigation Pane to close it.
2. Click the Create tab on the Ribbon and then, in the Other group on the Create tab,
click the Query Design button. Access opens the Show Table dialog box on top of
the Query window in Design view.
3. Click tblCustomer in the Tables list box, click the Add button, and then click the
Close button. Access places the tblCustomer table field list in the Query window
and closes the Show Table dialog box.
4. Double-click the title bar of the tblCustomer field list to highlight all the fields,
and then drag the highlighted fields to the first column’s Field text box in the
design grid. Access places each field in a separate column in the design grid, in the
same order that the fields appear in the table. See Figure 5-3.
You can also double-click a
table name to add the
table’s field list to the