Part I: Access Building Blocks
200
FIGURE 5.9
Criteria set for products with low inventory
The criteria applied to numeric fields usually includes comparison operators, such as less than (<),
greater than (>), or equal to (=). If you want to specify a comparison other than equal, you must
enter the operator as well as the value. Remember that Access defaults to equal when running a
select query. That’s why you needed to specify <10 in the QtyInStock column in the example
shown in Figure 5.9.
Access does not surround the criteria with quotes because QtyInStock is numeric and requires
no delimiter.
Entering true or false criteria
True and false criteria are used with Yes/No type fields. The example data that you supply as crite-
ria must evaluate to True or False. You can also use the Not and the <> operators to signify the
opposite, but the Yes/No data also has a Null state that you might want to consider. Access rec-
ognizes several forms of true and false.
Thus, instead of typing Yes, you can type any of these in the Criteria: cell: On, True, Not No, <>
No, <No, or –1.
Note
A Yes/No field can have three states: Yes, No, and Null. Null only occurs when no default value was set in
a table and the value has not yet been entered. Checking for “Is Null” displays only records containing Null in
the field, and checking for “Is Not Null” always displays all records with Yes or No in the field. After a Yes/
No field check box is checked (or checked and then deselected), it can never be Null. It must be either Yes or
No (–1 or 0).