auto numbering

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am working in a 9000 record Access database and adding records. Somehow
the auto number is way off. The autonumber should be a four digit number but
is now an 8 digit number. How do I correct this to get the autonumbering to
get back in order?

Thanks

LD
 
LD said:
I am working in a 9000 record Access database and adding records. Somehow
the auto number is way off. The autonumber should be a four digit number but
is now an 8 digit number. How do I correct this to get the autonumbering to
get back in order?

Deja-Vu all over again...

If you care about the value in ANY way other than uniqueness, then DON'T use an
AutoNumber. Their only purpose is to provide a unique value for creating
relationships between tables and/or as surrogate Primary Keys.

They WILL develop gaps (sometimes big ones) and they can even go negative. They
cannot be reliably used as a record "counter".
 
Remove any records that have the 8-digit number, and then compact the
database:
Tools | Database Utilities | Compact.

If that does not solve the problem, you need to download the lastest service
pack for your version of Office, and also for JET 4. Both are available from
the Downloads section at support.microsoft.com.
 
LD said:
I am working in a 9000 record Access database and adding records. Somehow
the auto number is way off. The autonumber should be a four digit number
but is now an 8 digit number. How do I correct this to get the
autonumbering to get back in order?

Thanks

LD

I am not sure what you mean by "The autonumber should be a four digit
number." The standard filed type for autonumber is long integer and you are
no where close to running out of space there and it is far larger than four
digits.

In any case, it would appear that your autonumber is on track. It
appears to be doing exactly what it is designed to do -- Assign a unique
number for each record. -- That is all it is designed to do. It is not
designed to provide sequential numbers.

I suggest you may not want to use Autonumber for that use. Autonumbers
are designed to provide unique numbers. It in not designed to provide
numbers in order and for a number of reasons may not do so. As a result
using them in any application where the user sees the numbers is likely to
end up with confusion.

There are other ways of providing the numbers you want depending on the
particual application.
 

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

Back
Top