- Click the Create tab on the ribbon.
- Click the Query Design button.
The query design window and Show Table dialog box both appear. Now you need to select the tables and/or queries you want to use in the delete query.
- Select the tables and queries you want to add and click Add.
- Click Close.
If the tables are related, Access automatically connects their common fields with a join line. If the tables aren't related, you will have to manually join them by dragging a field from one table's field list to the matching field in the other table's field list.
- Connect any unrelated tables.
Next, tell Access that this is a Delete query.
- Click the Delete button on the ribbon.
Access converts the select query to a Delete query and displays the Delete row in the query design grid. Now you need to tell Access what you want to delete.
- Double-click the asterisk (*) from the table field list for the table from which you want to delete information.
Notice that From appears in the Delete cell for the asterisk field, indicating that the records will be deleted from this table. Unless you want the delete query to delete every record in the table, you will need to add some limiting criteria.
- Drag the field you want to use as the limiting criteria onto the design grid.
Next you need to tell Access the specific data to delete.
- Click the field's Criteria row and type the specific data you want to delete and press Tab.
Access will add the quotation marks around the text string for you.
That's all there is to creating a Delete query.
Before you run a delete query, or any query, you should always preview the results in Datasheet view.
- Preview the query in Datasheet View.
The delete query displays the results of the delete query.
- Return to Design View.
Now run the delete query to delete the records.
- Click the Run button on the ribbon.
Access asks if you really want to delete the records.
- Click the Yes to confirm the deletion.
Access silently deletes all the records that you specified.