General discussion

Locked

Autonumber in Access Table

By bambamz ·
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.

This conversation is currently closed to new comments.

9 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by gralfus In reply to Autonumber in Access Tabl ...

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"

Collapse -

by bambamz In reply to

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.

Collapse -

by sgt_shultz In reply to Autonumber in Access Tabl ...

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

Collapse -

by bambamz In reply to

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?

Collapse -

by dsa In reply to Autonumber in Access Tabl ...

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.

Collapse -

by bambamz In reply to

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.

Collapse -

by dsa In reply to Autonumber in Access Tabl ...

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.

Collapse -

by bambamz In reply to

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.

Collapse -

by bambamz In reply to Autonumber in Access Tabl ...

This question was closed by the author

Back to Software Forum
9 total posts (Page 1 of 1)  

Related Discussions

Related Forums