want autonumber start at 1 after deleting all recs in the table

G

Guest

I want a table with an autonumber to start at 1 after I delete all the
records in the table.e.g I have 10 records in the table and i delete them
all. when i go to enter a new record then i want the autonumber to be 1
rather than 11.
 
N

Nikos Yannacopoulos

Numbering will start from 1 again (or max used number + 1) if you
Compact and Repair.

If you need strict number sequencing without gaps, then you must move
away from autonumbers, and use a function to calculate next number every
time (like DMax() + 1).

HTH,
Nikos
 
G

Guest

Although it is possilbe, what is the point? Autonumbers should never be
meaningful data. The purpose of autonumbers is a convenient way to establish
keys used to related data in different tables. Using them for anything else
is like using a screw driver as a chisel. It doesn't work that well and will
eventually break the screw driver.
 
G

Guest

I believe all you have to do is compact and repair the database and it will
start over at "1"
 

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

Top