new autonumber values already used in table

  • Thread starter mbr96 via AccessMonster.com
  • Start date
M

mbr96 via AccessMonster.com

I have an ID field set as the primary key for a table of invoices with about
9600 rows in it. The ID field is set as Autonumber, but the counter has
somehow reset itself to about 3200, meaning a new row gets created with ID
3200. But 3200 already exists, as does each value up to about 9600.

Of course, when that record tries to save, it doesn't allow it due to the key
violation.

What can cause the Autonumber field to reset to values already in the same
table??? I've advanced an autonumber field before to push it forward to some
round number 100000 or 5000 by appending blank rows in and letting the
autonumber advance itself, but that was when the autonumber values didn't
already exist in the table. I can't see advancing this counter 6000 times,
closing the table each time without saving the row. What can I do to advance
the counter to where it should be, over 9600+???

MBR
 
M

mbr96 via AccessMonster.com

Thank you so much, Allen, I've seen your name frequently in the posts. I
followed the instructions and this worked, and I realized I had caused it by
attempting to append some data to that table including the ID (as in your
list of causes).

The table is fine - I have people who need to use it and we would have had to
do something more drastic.

Thanks again - impressive!
MBR

Allen said:
In some versions of Access, you may be able to reset the AutoNumber just by
running a compact/repair.

Otherwise, see:
Fixing AutoNumbers when Access assigns negatives or duplicates
at:
http://allenbrowne.com/ser-40.html
I have an ID field set as the primary key for a table of invoices with
about
[quoted text clipped - 16 lines]
advance
the counter to where it should be, over 9600+???
 

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