the autonumber id problem

antonyx

Arsenal Supporter
Local time
Today, 21:34
Joined
Jan 7, 2005
Messages
556
wen u delete records, the id numbers screw up
say you have 5 records
you delete record 2
the numbers then read 1345, and so on, and from there it begins to just mess up if you keep deletin certain records
how do you make the autonumber id just be the number of the record in the file, do, all the numbers skip down if you delete a record
 
Autonumber

The sole purpose of the autonumber is to uniquely identify each record.
You cannot reset it and the fact that the number will not be continious after deleting a record plays no role.
Often the autonumber field is used for a primary key, which all tables should have.

If you need a meaningful number (invoice number, client number) you can ad another field of the number type .

Generally the DMax function is used to find the highest number in the table and increment it by one.
Do a search on this subject, there are many posts about this.
 
Pat,

Do you have a neat way of doing similar to your point #3, but only in a query (not a report) ?

Thanks.

John.
 

Users who are viewing this thread

Back
Top Bottom