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

Clear table info

Status
Not open for further replies.

rgaetos

IS-IT--Management
Jun 14, 2006
63
US
This is probably a going to sound dumb, but how do you clear all the information from all the table so that it is like a new database. I know you can delete records, but I can't get auto number to reset back to 0.
 
The method usually recommended is to make a copy the table (structure only), then run an append query to copy all the records from the original to the new table.

Ken S.
 
Try deleting any relationships which contain the Autonumber field causing the problem. Then delete the Autonumber field from the table in design view. Save your changes, exit the db, then reopen it. View the table in design view, Insert a new row to contain your autonumber field, set its type to number, then set it as the primary key.

Hope this helps.

Tom

Live once die twice; live twice die once.
 
Eupher's method is safer. Only use my method if you are getting rid of records, which it sounds like you are...


Tom

Live once die twice; live twice die once.
 
you can delete records, but I can't get auto number to reset back to 0
Compact and repair the DB to reset the AutoNumber of all empty tables.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Doh! PHV to the rescue again... I forgot about that one.

Ken S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top