Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing AutoNumber 8

Status
Not open for further replies.

Yzerman777

IS-IT--Management
Jun 26, 2001
7
US
Im working with forms to enter data into a table. While creating the form, I tested with random data and deleted that from the table. Now, my AutoNumber is higher than the actual number of data in the table. How can I change the current number of the AutoNumber? I would greatly appreciate any help. Thank you, in advance.

Chris Wildes
Low Level Tech Guy
 
If you wish to change the autonumber (either forward or back) enter the following in code (You can not do it through the Access GUI):

Create a new record in the database and assign the autonumber field then number –before- the one you wish to start with (usually zero). Now when you have created a new record the autonumber will increase from the number you just entered.

You must be careful if the autonumber is the primary key, that you do not get duplicates after you change it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top