"Gogo" <ep****@cableone.netwrote
On May 22, 4:02 am, "Rick Brandt" <rickbran...@hotmail.comwrote:
Gogo wrote:
Database has record 59 showing, tabing to enter data returns
autonumber to 134. What happened to cause this, how would I fix it?
AutoNumber's only specification is that they be unique. If you have
requirements beyond that then don't use an AutoNumber.
Rick Brandt, Microsoft Access MVP
Hey Rick: I just figured it out. to get AutoNumbering corrected. I
added a new field Client_ID_Number as AutoNumber, deleted the
incorrect field, saved structure and data with this new field. It
worked. Thanks, Gogo
Hey, Gogo...
No, you did NOT figure it out. Knowledgeable people have explained to you,
over and again, that Autonumbers (even using "Increment") are not
_specified_ to be monotonically increasing. How many times do they have to
repeat it before you understand that you have recreated a series without the
gaps, but you have not "corrected the problem" BECAUSE THERE WAS NOT A
PROBLEM?
Autonumbers are for internal use as surrogate keys, and for joining related
tables. They are not for display to humans, because of what you
experienced. And, the probability is very high that you will experience it
again.
If you are using Autonumbers as surrogate keys, and you have more than a
'flat file' design, those numbers will appear in related tables as Foreign
Keys. So what's happened to the linkage between your main table where you
arbitrarily replaced the Field and any related tables that used the original
Field (where you saw the gap) as Foreign Key? You certainly did not say
that you'd done anything to "fix" those Foreign Keys.
They say, "What a tangled web we weave when first we practice to deceive,"
but the same applies to "What a tangled web we weave when we insist on
something being what it is NOT, and then resort to workarounds to try to
make it so."
Give it up, Gogo, baby. And, don't come back here whining when you find
another gap in your "carefully fixed Autonumber" -- which you certainly will
in the circumstances others have described, and in some others not so
well-defined and publicized.
Larry Linson
Microsoft Office Access MVO