Empty Database history

  • Thread starter Thread starter mazz2000
  • Start date Start date
M

mazz2000

Hello
I have a pretty useful database that i've had to empty and give t
other people, when i do the autonumber fields still show that there wa
356 customers in the database, so when the other person puts the firs
customer it shows 357 in the autonumber field.
I've tried to delete the autonumber filed and add it again but it stil
does this.

My question is how to get rid of this history, i want to have th
tables empty and the autonumber start from 1 again.

Any one have an idea?

thank
 
mazz2000 said:
Hello
I have a pretty useful database that i've had to empty and give to
other people, when i do the autonumber fields still show that there
was 356 customers in the database, so when the other person puts the
first customer it shows 357 in the autonumber field.
I've tried to delete the autonumber filed and add it again but it
still does this.

My question is how to get rid of this history, i want to have the
tables empty and the autonumber start from 1 again.

Any one have an idea?

You'd be better not even showing the autonumbers to the users, for the
most part, and not expecting (nor letting your users expect) an
autonumber's value to have any other meaning than as a unique
identifier. By their very nature, autonumbers will develop gaps in the
sequence, and can even switch from consecutive to random if changes you
make to your database require it. All Access really promises you is
that (except in the case of a serious bug) an autonumber will be unique.

That said, I understand the impulse to tidiness that makes you want to
send off your database with a clean slate. In most versions of Access,
if you compact your database after emptying the tables, the next
autonumbers assigned will start at 1. It's a good idea to compact your
database after emptying the tables anyway; otherwise you'll be sending
out a database that is just as big as if all the tables were full of
records.
 
I've found the easiest way to do this is to copy the table that contains the
autonumber, however, only copy the structure - not the structure and data.
In the database window, select the appropriate table, choose the Copy
toolbar button, then Paste. When the window pops up, asking for the new
table name, be sure to choose Structure Only. This will give you all the
fields, but no info. The autonumber field will begin with 1. If necessary,
rename the old table to something else, and then rename the new table to the
original table name, so that it will work with all your other objects.

Simon Telling said:
Just compact your database and you should be fine.

Regards,
Simon
 
Back
Top