Resetting all tables back to zero

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am nearing completion of a new application and I want to clear out all the
data tabkes and reset the auto-numbered values back to zero. I noticed that
this was done when I originally split the front end from the back end. Is
there an easy way to do it now? I tried deleting all the rows in the tables
but the auto-numbered fields don't reset to zero.

Traveler
 
Auto numbers should reset to Max(ID) +1 when you compact the database.
(i.e., delete all existing records, then compact. Autonumbers should now
start at 1)
 
George,

Just a slight clarification here... An Autonumber will, as you suggest,
reset to 1 if the database is compacted after deleting all records. But
compacting when there is still data inthe table will not reset the
Autonumber seed value.
 
traveler said:
I am nearing completion of a new application and I want to clear out
all the data tabkes and reset the auto-numbered values back to zero.
I noticed that this was done when I originally split the front end
from the back end. Is there an easy way to do it now? I tried
deleting all the rows in the tables but the auto-numbered fields
don't reset to zero.

Traveler

I suggest you may not want to use Autonumber for that use. Autonumbers are
designed to provide unique numbers. It in not designed to provide numbers
in order and for a number of reasons may not do so. As a result using them
in any application where the user sees the numbers is likely to end up with
confusion.

There are other ways of providing the numbers you want depending on the
particual application.
 
But compacting when there is still data in the table will not reset the
Autonumber seed value.

Right you are.

I could have *sworn* that I had seen that behavior, but, of course, can't
seem to recreate it.

Good thing I wasn't counting on it, I guess. Hope the OP wasn't either.
 
George,

This was the case in Access 97 and Access 7. Probably should be
classified as a bug :-)
 
George,

Well, in all seriousness, a bug then, which they have now fixed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top