Delete tables and zero ID. numbers

  • Thread starter Thread starter IVOR
  • Start date Start date
I

IVOR

I have a test database I wish to "empty" the tables and
start the ID records from 0/1.
Can this be done?
When I delete it always remembers the last record ID
number.
 
Ivor

Depending on version, from what I understand, you can try "Compact & Repair"
to "zero out" an empty table's Autonumber field.

However, a scan through this newsgroup (tablesdbdesign) will reveal a strong
consensus that there are very few reasons why it matters what number an
Autonumber is -- they're designed to be (generally) unique row identifiers,
and probably aren't terribly suitable for human consumption <g>.
 
Ivor,

Although I agree with Jeff's comments if you really feel the need to do this
it's not that hard. Try these steps.

1. Copy your table Ctrl-C then Ctrl-V
2. Select the structure only option for the new table.
3. Create an append query using the original table as the source and the new
one as the destination.
4. Make sure to EXCLUDE the autonumber field from the output of the append
query.
5. Run the query.
6. DON'T delete the original table until you're sure this is what you want.

This should get your autonumber IDs restarted from 1.

If you were successful in getting this done and you had any other tables in
your database you have likely broken any relationships this table might have
shared with those other tables. If you had no other tables you're in
business.

HTH

Earl Lewis
 
Back
Top