You can enter additional criteria for the same field or different fields. When you type expressions in more than one Criteria cell, Microsoft Access combines them using either the And or the Or operator. If the expressions are in different cells in the same row, Access uses the And operator, which means only the records that meet the criteria in all the cells will be returned. If the expressions are in different rows of the design grid, Access uses the Or operator, which means records that meet criteria in any of the cells will be returned.
The following examples show different ways to combine criteria with the And operator or the Or operator.
One field using the Or operator
Region is SP or RJ.
Access shows all company names that meet one of the criteria.
One field using the And operator
Company name begins with "The" and includes the word "Box."
Access shows the company name that meets both criteria.
Two fields using the Or operator
Company name begins with H or region is RJ.
Access shows all company names that meet the criteria for the first field or the second field.
Two fields using the And operator
Company name begins with H and region is RJ.
Access shows all company names that meet the criteria for the first field and the second field.
Three fields using the Or operator and the And operator
Company name begins with H and region is RJ ...
... or region is SP and city begins with C.
Access shows all company names that meet the criteria for the first or second row of the design grid.
Where you specify criteria affects when calculations are performed
You can also specify criteria to affect the calculations and produce different query results. By adding criteria, you can limit the:
-
Groups before performing calculations on those groups.
-
Results after calculations on the groups are performed.
-
Records before they are grouped and before calculations are performed.