Append Queries | CustomGuide

Append Queries

How to Create Append Queries in Access

Append Queries

An Append query takes a group of records from one or more tables or queries in your database and adds them to another table. Append queries are especially useful for importing information into a table. There are several rules that you must follow when using an append query:

  • The appended data must meet the data validation and referential integrity rules of the table to which it is being added.
  • The appended data must have its own unique primary-key values. If the primary-key field in the table to which the data is being added is an AutoNumber field, do not append that field— Access will generate new numbers for the new records.
  • The type of data in the records you're adding must match the type of data in the table to which you're adding them.

Create an Append Query

  1. Click the Create tab on the ribbon.
  2. Click the Query Design button.
    Create an Append Query

    The Query Design window and Show Table dialog box both appear. Here you should select the tables and/or queries containing the data you want to append to another table.

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

    Now you need to make the query an Append query.

  5. Click the Append button.

    The Append dialog box appears. Here you need to select the table to which you want the results of the query to be added. First, though, you need to select the database where the table is located. You have two options:

    • Current Database: If the table is in the currently open database.
    • Another Database: Browse other databases.
  6. Select the Current Database or Another Database option.
    Create an Append Query

    Now select the table.

  7. Click the Table Name list arrow and select the table.
  8. Click the OK.
    Create an Append Query

    The Append query will add the results of its query to the table you just specified. Notice that an Append To row appears in the design grid. Now you need to specify the fields you want to append.

  9. Add the fields you want to append to another table.

    If the field(s) you added are present in the destination table, Access automatically fills in the Append To row. If the field is not present in both tables, you will have to select the name of the field to which you want to append.

  10. If Access doesn't automatically match a field, click the Append To row for that field and select the field to which you want to append.
    Create an Append Query

Preview and Run a Query

As with any action query, you should always preview the results in Datasheet View first.

  1. Click the View button to preview the query.
    Preview and Run a Query

    The Append query displays the records it will add or append.

  2. Click the View button to display the query in Design View.

    Now run the append query to append the records.

  3. Click the Run button on the ribbon.

    Access asks you to confirm the addition of the records to the table.

  4. Click Yes.
    Preview and Run a Query

Access adds the records.