Entering Criteria to Match More Than One Field


graphics/06inf16.jpg

graphics/one_icon.jpg

After you've displayed the query for which you want to enter criteria in Design view, click the cell in the Criteria row for the first field you want to match (here, Artist ).

graphics/two_icon.jpg

Type the first criterion (in this example, O'Hara ).

graphics/three_icon.jpg

Click in the second field you want to match (here, Price ) and type your second criterion ”in this example, >50 (to find all pieces by the artist that cost more than $50).

INTRODUCTION

In addition to running a query to match one or more values in a single field, you can also create a query that requires a match in more than one field. For example, you might run a query to return a list of products by a particular artist within a certain price range, as shown here.

graphics/06inf17.jpg

graphics/four_icon.jpg

Click the Save button on the Standard toolbar in the main Access window to save the query design.

graphics/five_icon.jpg

Click the Run button to run the query.

graphics/six_icon.jpg

Access runs the query and displays a table containing only those records that match the criteria you entered (here, all products by artist O'Hara with a price more than $50).

graphics/seven_icon.jpg

Click the Close button to close the query window.

TIP

AND Queries

This type of query is sometimes called an AND query because the data in the selected table must match both the first criteria and the second criteria to be included in the results.

TIP

Criteria

For the criteria, you can type a value to match or build an expression using operators ( >, <, = , and so on).



Easy Microsoft Office Access 2003
Easy Microsoft Office Access 2003
ISBN: 789729598
EAN: N/A
Year: 2003
Pages: 174

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net