Database Reference
In-Depth Information
that this field can include deletion criteria. The Discontinued field is set to the Yes/
No data type, which is represented in the datasheet as a check box that is selected
to indicate Yes and cleared to indicate No. To locate all discontinued products, you
need to identify records with the Discontinued field set to Yes.
5
In the
Criteria
row of the
Discontinued
field, enter
Yes
, and then press the
Enter
key.
Before we do anything else, let's test the query.
6
Without running the query, switch to
Datasheet
view, which displays the 18
discontinued products that will be deleted if you run the query.
7
Scroll to the right to verify that for all records, the
Products.Discontinued
check box
is selected.
8
Switch back to
Design
view, and run the query.
Before deleting the records, Access warns you of the permanence of this action.
9
In the message box, click
Yes
, which displays another warning.
Access cannot delete two of the discontinued records.