How do I reset autonumber field in access 2003?
3 Answers
Use the "compact and repair" process. This will reset the auto increment back to 0 (for empty tables that is). If the table is still populated with records you don't want to reset the counter i think...
It can be found under: Tools >> Database Utilities >> Compact and Repair Database
-
It resets it only on an empty table and resets it to 1, not 0. Commented Mar 11, 2010 at 13:18
-
@David are you sure about that. I am pretty sure it stores the current maximum ID. When a new row is added it will be maxid+1. If the value that was stored was 1 for a new/clean table then the first ID that gets assigned would be 2. Commented Mar 18, 2010 at 23:17
-
It does not store the current max but the next value, i.e., the Seed value. The seed value never resets to 0 unless you do it in code. Commented Mar 19, 2010 at 22:52
A quick "totu" here with few ways to reset it. From Microsoft KB:
http://support.microsoft.com/kb/812718
"I can't paste it here since it's in french for me"... sorry!
If you are having index problems or wish to reset an autonumber seed to a sepcific value for unusual reasons see Set AutoNumbers to start from ...