ACC2: Counter Starts at 2 in Table Created by Make-Table Query

Last reviewed: May 28, 1997
Article ID: Q112160
The information in this article applies to:
  • Microsoft Access version 2.0

SYMPTOMS

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

If you run a make-table query with a criterion that has no matching records, the query creates an empty table. If you run an append query with a criterion that has no matching records, no records append to the destination table. In either case, if the destination table contains a Counter field, the next record you add to the table will have a counter value one number greater than you expect.

CAUSE

Microsoft Access version 2.0 provides the next value for Counter fields internally. Because it reserved a number for the first record added by the query, and the query did not add any records, the next value for the Counter field is one number greater.

RESOLUTION

View the make-table or append query in Datasheet view before you run it, to be sure the query returns records.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Open the sample database NWIND.MDB.

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

  3. On the Query menu, click Make Table. Type Empty Table in the Table Name box, and then click OK.

  4. Drag the [Employee ID] and [Last Name] fields to the QBE grid.

  5. Type <1 in the Criteria row for the [Employee ID] column.

  6. Run the query. Note that a new, empty table called Empty Table is created.

  7. Open the Empty Table table and type a name in the [Last Name] field. Note that the counter starts at 2 instead of 1.

REFERENCES

For more information about make-table queries, search the Help Index for "make-table query."

For more information about append queries, search the Help Index for "append queries."


Keywords : kbusage QryMktbl
Version : 2.0
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
Resolution Type : Info_Provided


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 28, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.