Autonumber??

J

justin

I've created a database to store information about various
documents coming into the office, but I don't have any
actual documents to use yet so I've just been entering
fake information into the fields to make sure the database
is doing what I want it to do.

However, after I check to see that things work, I delete
all the fake information I enter.

But, the next time I go to enter information, the
Autonumber doesn't reset back to 1, it just keeps
increasing, so I'm now at number 23 even though there are
not 22 other documents in the database.

How do I make the Autonumber field reset when information
is deleted?

Thanks in advance for the help.

-justin
 
R

Rick Brandt

justin said:
I've created a database to store information about various
documents coming into the office, but I don't have any
actual documents to use yet so I've just been entering
fake information into the fields to make sure the database
is doing what I want it to do.

However, after I check to see that things work, I delete
all the fake information I enter.

But, the next time I go to enter information, the
Autonumber doesn't reset back to 1, it just keeps
increasing, so I'm now at number 23 even though there are
not 22 other documents in the database.

How do I make the Autonumber field reset when information
is deleted?

Thanks in advance for the help.

-justin

You can't. AutoNumbers are designed to be unique, not sequential without
gaps. If that is a priority then don't use an AutoNmuber.
 
G

Guest

Ok, thanks.
It's not a priority, I was just thinking it would be nice
to have the numbers reset when users started entering real
information into the system.
 
J

John Vinson

Ok, thanks.
It's not a priority, I was just thinking it would be nice
to have the numbers reset when users started entering real
information into the system.

Depending on your version of Access, try compacting the database after
you've deleted all the records in the table. This resets the
autonumber (but not in all versions).

John W. Vinson[MVP]
 
J

justin

Perfect!
thanks for the help

-justin


-----Original Message-----
Yep, John's advice is correct, and it does apply to all versions.

--
Steve Schapel, Microsoft Access MVP



.
 

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