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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

please help!!! w/ Access 2

Status
Not open for further replies.

hkvanx

Technical User
Jun 3, 2002
10
0
0
US
I want to reset the autonumber function in an existing Access database, preferably in a procedure that does not require any sort of programming (I am not a programmer). If the procedure does require some programming, please provide some helpful insight.

As of right now, the steps that I have been give by another person from my dept is not working. The instructions are listed below:

-select tools (menu) and check display database window, close and reopen program.
-select targeted table and open it in design view
-select autonumber cell and change it to text, save program
-Then select same cell and change it back to autonumber to save program

After following these directions, I received a pop-up window with the following message:

"Once you enter data in a table, you cannot change the data type of any field in the autonumber, even if you have not added data to that field. Add a new field to the table and define it as autonumber."

THX
 
BTW, I want to delete existing records permanently and have new records begin with 1, etc.

Hkvanx
 
1)Create a make table query including all the columns from the original table except the autonumber column.
2)Run the query.
3)Open the new table in design mode and add a new column designating it as the autonumber field and save the table.

If you want the records in a specfic order prior to renumbering, then when you create the query use the sort order options.

Note: if other tables use this value as a foreign key that valid connection will be lost.

Good Luck
ssecca
 
Because you do not want to save the old data ther is an easier way.
1) From the database window right click on the table you want to reset the autonumber and click copy.
2) in a blank area of the window right click and select paste. (Paste structure only)
3) delete original table rename new table your all set.
 
If you clear all data from an existing table to reset the autonumber you have to compact the database after deleting the data

Danny
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top