Go to Topic 11 * Access Database Skills Table of Contents * Technology Skills
Examples of Query Criteria
Discuss the examples below. Then use one of the sample queries in the sample database to experiment with different criteria.
Text Fields
Exact match | Lastname | Smith |
| LEANO | "0801" |
| Grade | "09" or "10" |
"Like" | Lastname | Like "*sm*" |
| EcoDis | Like "Y*" |
Blank | Bilingual | Is Null |
| Bilingual | Not Null |
Number Fields
Exact match | DaysAbsent | 0 |
| DaysAbsent | 0 or 1 |
Range | DaysAbsent | Between 0 and 5 |
Comparison | DaysAbsent | >5 |
Date Fields
Exact Match | StartDate | #9/1/2002# |
Range | StartDate | Between #9/1/2002# and #6/30/2003# |
Comparison | BirthDate | <=#1/1/1985# |
Criteria for checkbox fields (yes/no)
Criteria for a parameter query (which prompts user for info)
CIPCode | [For what CIP Code?] |
StartDate | Between [Starting when?] and [thru when?] |
Criteria based on a value on a form
StartDate | Between forms!reportmenu!date1 and forms!reportmenu!date2 |
|