Delete Queries | CustomGuide

Delete Queries

How to Create Delete Queries in Access

Delete Queries

Create a Delete Query

  1. Click the Create tab on the ribbon.
  2. Click the Query Design button.
    Create a Delete Query

    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.

  3. Select the tables and queries you want to add and click Add.
  4. Click Close.
    Create a Delete Query

    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.

  5. Connect any unrelated tables.

    Next, tell Access that this is a Delete query.

  6. 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.

  7. Double-click the asterisk (*) from the table field list for the table from which you want to delete information.
    Create a Delete Query

    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.

  8. 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.

  9. Click the field's Criteria row and type the specific data you want to delete and press Tab.
    Create a Delete Query

Access will add the quotation marks around the text string for you.

That's all there is to creating a Delete query.

Preview and Run a Query

Before you run a delete query, or any query, you should always preview the results in Datasheet view.

  1. Preview the query in Datasheet View.
    Preview and Run a Query

    The delete query displays the results of the delete query.

  2. Return to Design View.
    Preview and Run a Query

    Now run the delete query to delete the records.

  3. Click the Run button on the ribbon.

    Access asks if you really want to delete the records.

  4. Click the Yes to confirm the deletion.
    Preview and Run a Query

Access silently deletes all the records that you specified.