Change Value of AutoNumber

V

Volta

I have followed the online steps for changing the starting value of an
AutoNumber field; creating temporary table, executing append query, etc.
The append query appends the record from the temporarty table to the
designated database table but the AutoNumber flag is not being reset. (When
I proceed to add new records to the database table, the AutoNumber field
continues rather than starting at 1 greater than the appended record. Any
suggestions?
 
A

Allen Browne

Perhaps you have compacted the database again after appending the record?
That will generally reset the autonumber to 1 again.

If you cannot get the typcial approach to work, e.g.:
http://members.iinet.net.au/~allenbrowne/ser-26.html
and you are working with Access 2000 or later, you can also set the Seed of
the AutoNumber column. This can only be done through ADOX. There is a
(rather involved) example at:
http://members.iinet.net.au/~allenbrowne/ser-40.html
The example does illulstrate how to find the AutoIncrement column in the
table, and set its Seed property, but it actually goes the other way
(resetting to 1).
 
V

Volta

Thank you Mr. Browne! I simply had to execute the Compact and Repair
Database from the Tools:Database Utilities menu. (All I needed was to set
it back to 1. Had I needed to set it to any other value I would delve in
deeper but I am going to move on for now!) I don't know why the other
method was not working for me but this was sure simpler! I appreciate your
time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top