Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Reset the Autoincrement Column

Author  Topic 

Amjath
Yak Posting Veteran

66 Posts

Posted - 2007-01-29 : 05:22:40
Hi All,
how to reset the Auto increment column in Access.

-Amjath

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-01-29 : 05:27:03
Reset teh value?
Is the column still there or have you deleted it?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-01-29 : 05:39:12
There is no option to reset AutoNumber seed through UI. You can however use CREATE TABLE statement to create it through query.

If you are talking about changing existing column seed, then below is the procedure to change AutoNumber seed described in the Help:

quote:
1. If your original table contains property settings that prevent Null values in fields, you must temporarily change those properties. These settings include:
a. The Required field property set to Yes
b. The Indexed field property set to Yes (No Duplicates)
c. A field and/or record ValidationRule property that prevents Null values in fields
2. Create a temporary table with just one field: a Number field. Set its FieldSize property to Long Integer and give it the same name as the AutoNumber field in the table whose value you want to change.

3. In Datasheet view, enter a value in the Number field of the temporary table that is one (1) less than the starting value you want for the AutoNumber field. For example, if you want the AutoNumber field to start at 100, enter 99 in the Number field.

4. Create and run an append query to append the temporary table to the table whose AutoNumber value you want to change.

5. Delete the temporary table.
6. Delete the record added by the append query.
7. If you had to disable property settings in step 1, return them to their original settings.

When you enter a record in the remaining table, Microsoft Access uses an AutoNumber field value one (1) greater than the value you entered in the temporary table.



Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

ITpassenger
Starting Member

6 Posts

Posted - 2011-08-09 : 00:46:20
I think this link will help you a lot

http://support.microsoft.com/kb/812718
Go to Top of Page
   

- Advertisement -