Wednesday, November 4, 2009

How to Reset/restart autonumber in ms Access database table?


Autonumber column/field in MS-Access database table will be automatically incremented when adding any new row of data.


Assume that you are having some set of rows in a table, and you are deleting those rows and willing to add new rows. In this scenario, the autonumber column of the new rows will not be restarted. They will continue from previous set of rows.

If you want to reset or restart the autonumber column you can follow any one of below approach.

After deleting the old rows, we can click Tools->Database Utilities->Compact and Repair.. for reseting the autonumber column.



Or alternatively, after deleting the old rows in a table we can copy and paste the table as a new table with "structure only" option.



More Articles...

4 comments:

Anonymous said...

Nice post. I also created a video regarding this at

http://www.youtube.com/watch?v=hiWqqlT0G2E

Alex said...

I frequently work with access files,but yesterday I was astonished. Because my files were lost irrelatively unexpectedly. To my good fortune I entered a friend's house and saw there an interesting tool on his PC. I used the Google and found it on a soft blog - Repair MDB file. I wondered when it resolved all my problem for a minute and absolutely free it I didn't make a mistake. I recommended it for my friends and they told me: Thanks. And gave me a bottle of wine))

Anonymous said...

well... you can simply go to manage-->compacat and repair..

Anonymous said...

Tnx for this post..it really helps a lot...

Search This Blog