autonumber

  • Thread starter Thread starter Delf
  • Start date Start date
D

Delf

You know how access gets rid of an autonumber when
deleting a record. Well is there anyway to recuperate
those numbers to avoid from having too many gaps? and
that also the number can match the scrolling number down
on my scroll bar?
Tx
 
You know how access gets rid of an autonumber when
deleting a record. Well is there anyway to recuperate
those numbers to avoid from having too many gaps? and
that also the number can match the scrolling number down
on my scroll bar?
Tx

Why would you want to re-use missing AutoNumbers? The purpose of
AutoNumber is to provide a unique number to assure Parent-Child record
relationship accuracy. It should be irrelevant whether the numbers are
consecutive or not. If you wish to have some sort of consecutive
record numbering, you'll need to create your own, but even then, if
you delete a record you'll have a gap. It really doesn't matter!
 
You know how access gets rid of an autonumber when
deleting a record. Well is there anyway to recuperate
those numbers to avoid from having too many gaps? and
that also the number can match the scrolling number down
on my scroll bar?
Tx

Just to amplify Fred's good advice:

Gaps just come with the territory when you're using Autonumbers.

An Autonumber IS NOT A RECORD COUNT. An autonumber has one purpose,
and one purpose ONLY: to provide a unique, unchangable key for a
record, for use in linking to other tables. Generally users should not
even be allowed to *see* autonumbers, much less base expectations upon
them!

Think about it: If you had 32884 records in your table, each record
linked (by its Autonumber value) to four or five other tables; and
hundreds of the autonumber values written down on Post-It notes,
EMails, memos, and in people's minds...

And you delete record 3...

do you REALLY want to track down everywhere that the remaining 32881
values exist and change every single one of them, just to do away with
a gap?
 
Back
Top