Discussion Locked

Autonumber in Access Table

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have an access 2002 table that was auto numbered. Then I had records from previously that I have to input in this table. I need them to keep the numbers they already have. So I have 1451 records that already have numbers and then I need it to start autonumbering after those numbers. Is there any way I can keep the numbers that I have and then have it autonumber from then on? Oh please say yes and how.

9 replies

by gralfus

According to the help file in Access, it can be done. However, it doesn't sound easy to me. Bring up the help file and do a search on "number", and choose the topic "Change the starting value of an AutoNumber field"

by bambamz

I am able to do this, the problem that i have is I have 1451 records that are already numbered. I want them to stay that number and then autnumber from the last record on. Seems that I can only autonumber from the beginning.

by sgt_shultz

go look in Access help like he told you. between that and support.microsoft.com and the Access home page all this is documented with examples.
basically, ya don't get autonumber anymore. you gotta make a new index by copying the numbers from the autonumber field into your new index field (hint: update query) and handle autonumbering yourself with a macro that increments a counter and assigns a number to new records. (hint: you will be entering new records only thru a form with this macro attached to it)
i believe this is the first time i have been provoked to say this:
rtfm

by bambamz

Helping me. . . . . sort of.
autonumbering yourself with a macro that increments a counter and assigns a number to new records. (hint: you will be entering new records only thru a form with this macro attached to it)
I understand the concept of this but am not at all savy in the way of macros or how to build and attach them. Want to provide info?

by dsa

Ccreate a new table from the old table. Append the access 2002 table to the new table. This will append the old records with their autonumber ID. Any records added to this new table will now start from the last autoNumber + 1.

by bambamz

I want the two tables merged (as you indicated) but I want them to keep the numbers they have and then autonumber after the last record.

by dsa

You can merge two or more tables into the new table. You should append the 1451 records first to the new table so that it will maintain the same ID. Then you should create an append query without the ID and append to the new table. The auto number function always look at the last number assigned and start from there when you append new records. You can, however, only maintain existing numbers on the first 1451 records you already have.

I use this feature everytime I want start the autonumber to any pre-determined number like check number, invoice number, etc.

Autonumber always start from 1 on a new table or to the last number + 1 on a compacted table. The principle is to write a dummy record with an ID equal to the desired number less 1.

by bambamz

I don't know if you said it different or I held my mouth right but I totally got his and IT WORKED. . . .w oooo hoo o o o thanks so much.

This discussion is closed to new replies.