Discussion Locked

MS Access-Autonumber starting number.

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I know this can be done but I can't figure it out. I just want my Autonumber (primary field) to start incrementing from 8499.

4 replies

by oz_media

This solution taken from the Microsoft Access 97 KnowledgeBase, aritcle
number Q94821

By design, Microsoft Access always numbers AutoNumber fields beginning
with the number 1. You cannot edit an AutoNumber field or change its
starting value.

However, you can force Microsoft Access to number an AutoNumber field
with a number you choose by following these general steps:

- Copy the design of the original table in which you want to set the
starting AutoNumber value to a new table.

- Change the AutoNumber field in the new table to a Number field with a
FieldSize property of Long Integer.

- Add a record to the new table, and set the Number field to a value
that is one less than the starting number you want for your original
table. For example, if you want the AutoNumber field to start at 100,
type 99 in the Number field of the new table.

- Use an append query to add this new record to your original table.
This action forces Microsoft Access to number any new AutoNumber fields
with your number plus 1.

NOTE: Do not compact the database before you add a new record to the
original table. If you do, Microsoft Access will reset the AutoNumber
field value to the number 1.

by desktroll

run the query

INSERT INTO Table1 ( Field1 )
SELECT 8498 AS NewAutoNumValue;

using your table and autonumber field names and the next record will be 8499

This discussion is closed to new replies.