Loading Consent Dialog

Refining Queries  «Prev  Next»

Lesson 9Creating action queries
ObjectiveCreate action queries to perform bulk operations.

Creating Access Action Queries

When creating action-type queries, you will start the same way as starting with a Select query:
  1. Create a Select query by clicking the New button while in the Queries list of the Main Database window, then pick Design view.
  2. Include the fields that will be affected, for example, fields that you would like to have updated by an Update query.
  3. Set the criteria if needed.
  4. Test the query to make sure the correct records will be affected by clicking the View button
    Access View button
  5. Change the query to the action query type you want by using the Query Type toolbar button.
  6. Set any action-query-type-specific properties such as the new table name for the Make Table or Append queries. Here is the dialog for the Make Table query, asking for the new table name:

Dialog for the Make-Table query

  1. Run the query.

When you run the query by clicking the Run toolbar button
Run toolbar button
, Access will present you with a dialog telling you how many records are affected. This dialog also allows you to verify that you do in fact want to perform the requested query. You can see an example of the dialog below.

There is also an alternate way to view results without running the query.
Be careful when running any of the action queries, especially the Delete and Update queries. These types of queries alter or destroy data enmasse, so you must use extra caution and test them well. In the next lesson, you will learn how to work with a Totals query to present group totals.

Query Join Types - Quiz

Click the Quiz link below to answer a few questions about query join types, query types, and action queries.
Query Join Types - Quiz

Creating Action Queries - Exercise

Click the Exercise link below to practice creating an action query.
Creating Action Queries - Exercise