Access 2016 Intermediate
Lesson 3 – Using Operators in Queries
Access 2016
U SING C OMPARISON O PERATORS
Discussion
You can add criteria to a query to limit the number of records in a recordset. The simplest criterion is to find all records matching a single value.
Also use comparison operators to limit a recordset to a group of records. Comparison operators are symbols that represent conditions recognized by Access. The following comparison operators are available in Access:
Operator Description < less than <=
less than or equal to
>
greater than
>=
greater than or equal to
=
equal to
<>
not equal to
Not
reverses logic
Use one or more comparison operators to compare a specified value to all the values in a field. For example, find all customers with credit limits of less than $1000 or all customers with a contract date on or before January 2010; use a combination of comparison operators and field values to write an expression defining the desired criteria (e.g., <1000 or <=1/1/01, respectively).
When you run the query, only records with values meeting the specified criteria appear in the recordset.
Page 52
OFFICEPRO, Inc.
Made with FlippingBook - professional solution for displaying marketing and sales documents online