ID numbers in Access records.

T

theIThombre

Question Gang, I am new to Access 2007 and had a question about the id
numbers that begin every record. I noticed that once I delete a record, that
the following number is used instead of the one that it originally had. For
example, if i had ten records, and deleted the tenth, when i punch in a new
record, it gives me eleven for an id number instead of ten.

Is there a way to change that in 2007 so that all the id numbers can be in
sequencial order?

Any help will be appreciated!
 
J

John W. Vinson/MVP

Question Gang, I am new to Access 2007 and had a question about the id
numbers that begin every record. I noticed that once I delete a record, that
the following number is used instead of the one that it originally had. For
example, if i had ten records, and deleted the tenth, when i punch in a new
record, it gives me eleven for an id number instead of ten.

Is there a way to change that in 2007 so that all the id numbers can be in
sequencial order?

Any help will be appreciated!

The "Autonumber" field has one use, and one use only: to provide a
guaranteed unique ID. It is not designed or intended to be sequential.
It is emphatically NOT a "record number"! Tables have no order, and
should be considered unordered "bags" of data.

One thing to consider: Suppose you had 24481 records in your table,
each of them linked to several other tables. You realize that record
number 2 was a test record which should not have been entered. If you
delete it, do you really want to renumber records 3 through 24482, in
all the tables where those numbers are found? What about all the
printouts that have ever been printed with those numbers? What about
all the minds where those numbers are memorized? OUCH!!!

If you need a sequential number, don't use Autonumber; instead use an
Integer or Long Integer field, and program it yourself. Search the
groups for "Custom Counter" for examples of how to do so. In general
you should not use table datasheets for interaction with the data *at
all* - instead use Forms, and keep any Autonumbers concealed from user
view.
 

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