Page 2 of 9PREVNEXT

Queries V: Use And, Or, and In to set multiple conditions

Using multiple conditions in a query


Suppose you want to send a newsletter to some of your customers in France, but only to people who own their own stores. You can find that data by filtering your result set, but it's faster and easier to set multiple conditions — criteria that your data must meet to be included in your results.

When you set multiple conditions, you also use logical operators such as And, Or, and In. These operators help you retrieve just the data you need, and you'll see how they work in a little while. For now, let's add conditions to a query:

Callout 1 Open your query in Design view, and in the Criteria cell for the field where the first condition applies, enter your criteria. Remember that the criteria you enter has to match a value in your data.
Callout 2 Do the same for any other fields. For example, you could type owner under the ContactTitle field and France under the Country field.
Callout 3 When you run the query, Access uses the And operator to retrieve data that meets your conditions.

Access uses the And operator whenever you place all your criteria on the Criteria row. Next, we'll look at how you can use the Or operator.

Page 2 of 9PREVNEXT