Retrieve records containing values between, >, <, >=, <=, or <> specified values
- In query Design view, create a query. Add the tables whose records you want to use, and then add the fields you want to include in the results to the query design grid.
- In an expression in the Criteria cell of the appropriate field, identify a range by using the Between...And operator or the comparison operators (<, >, <>, <=, and >=). For example, you can find orders placed before 1-Jan-93 or products that have between 10 and 35 units in stock. The following table shows some examples of operators used in expressions.
Expression |
Meaning |
>234 |
Numbers greater than 234 |
Between #2/2/93# And #12/1/93# |
Dates from 2-Feb-93 through 1-Dec-93 |
<1200.45 |
Numbers less than 1200.45 |
>="Callahan" |
All names from Callahan through the end of the alphabet |
Note Dates and numbers are displayed in the query design grid in the format appropriate for the country selected in the Regional Settings of Windows Control Panel. For example, the date sequence is month/day/year for the United States, day/month/year for the United Kingdom, and year/day/month for Sweden.