| Lesson 11 | Using multiple criteria |
| Objective | Use multiple criteria to limit the results of a query. |
In many real-world situations, a single criterion is not enough to narrow a query to the records you truly care about. You may want to limit results to a specific client and a particular date range, or show records that match one company or another. In Microsoft Access 365, you use multiple criteria and logical operators to express these conditions in the query design grid.
Logical Operators |
|
| Operator | How it works |
|---|---|
| AND | Returns records only when all criteria are true for that record. |
| OR | Returns records when at least one of the criteria is true. |
| NOT | Returns records where the specified criterion is false. |
AND is the more restrictive operator because all conditions must be satisfied. OR is more permissive, because a record is shown if it satisfies any one of the listed conditions.
Field: Company Date Due Date
Table: Clients Hours Projects
Sort: Ascending
Show: Yes Yes Yes
Criteria: "Network Consultants," < #8/31/99#
Or:
In this example, a record is returned only if:
"Network Consultants,", and#8/31/99#.
+-----------+---------+-----------+
| Field | Table | Sort |
+-----------+---------+-----------+
| Company | Clients | (none) |
| Date | Hours | Ascending |
| Due Date | Projects| (none) |
+-----------+---------+-----------+
Criteria and Or rows are used to combine conditions across these fields.
In the full design grid (not shown here), criteria placed on the Criteria row and additional lines on the Or rows allow you to express combinations such as:
For example:
Row 1 (Criteria): Company = "Network Consultants," AND Date < #8/31/99#
Row 2 (Or): Company = "ABC Webworks"
Row 3 (Or): Due Date < #9/30/99#
A record will be included if:
This combination allows you to express powerful filters using only the design grid—no manual SQL required.
To use multiple criteria effectively in Microsoft Access 365:
By understanding how AND and OR work within the design grid, you can build precise filters that return exactly the data your query needs.