ACC2: Failed Append Query Still Increments Table Counter by 1

ID: Q154010


The information in this article applies to:


SYMPTOMS

Novice: Requires knowledge of the user interface on single-user computers.

When you run an append query that appends zero rows, the counter value in the table is incremented by one.

NOTE: This behavior also occurs in a make-table query that copies zero rows to the new table.


RESOLUTION

After you run an append query or make-table query that returns zero rows, you can reset the counter value by compacting the database.

For more information about this topic, search on the word "Counter," and select "Changing the Starting Value of a Counter Field (Common Questions), using the Microsoft Access 2.0 Help Index.


STATUS

Microsoft has confirmed this to be a problem in Microsoft Access 2.0. This problem no longer occurs in Microsoft Access version 7.0.


MORE INFORMATION

CAUTION: Following the steps in this example will modify the sample database NWIND.MDB. You may want to back up the NWIND.MDB file, or perform these steps on a copy of the NWIND database.

Steps to Reproduce Problem


  1. Open the sample database NWIND.MDB.


  2. Open the Employees table, and create a new record to see what the next counter value is.


  3. Create a new query based on the Employees table.


  4. Change the query to an Append query. In the Query Properties dialog box, in the Table Name box, select Employees.


  5. Drag the Employee ID field to the query grid.


  6. Set Criteria to Is Null.


  7. Run the query. Note that you receive the error message "0 row(s) will be appended." Click OK.


  8. Open the Employees table again and create another new record, notice that the Employee ID counter value has incremented by two over the previous record.


Additional query words: Make Table Increments


Keywords          : kberrmsg kbusage QryAppnd 
Version           : 2.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: May 3, 1999