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

Resetting Auto Number data types 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Is it possible to reset an autonumbered field when records are deleted from the database?
 
Hello,

I was looking at this today...with the database open, go to 'Tools', 'Database Utilities', then 'Compact and Repair Database' (in Access 2000) or 'Compact Database' (in Access 97. This should get rid of any unwanted autonumbers that you do not need anymore.

Piran
[sig][/sig]
 
Try doing a select ordering by the autonumber field with offset 0 (zero) and limit 1 (one) and then updating that field to your number....

I hope it works... [sig][/sig]
 
(auto increment) My auto increment field in mySQL Database does not work perfectly together with access 2000. I get an error message after I have inserted more than two records. Does anybody know about this problem and can tell me how to solve?

Thanks Armin [sig][/sig]
 
just as suggestion..
what i've done before to reset autonumber field was to drop the column with autofield, then use ALTER table to insert this column back as autonumber.
if you have this field indexed, then drop index first, then drop column, then add column, then add index back.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top