470,591 Members | 1,773 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,591 developers. It's quick & easy.

XP professional SP2/MS Access 2003 Problem with Autonumber


I have a problem with a table in my MS Access 2003 table. The primary key of this table is an autonumber field set to a Long Integer, Yes - no duplicates. The autonumber made it to 10252. Now when I try to add a new record the autonumber started over at 1. Therefore I am getting an error message saying that it can't save this new record because it contains duplicate values.

My best guess is that I need to reset the autonumber to start from 10252. This table is in a student tracking database with dependencies in our computer based training (CBT) modules so I can't just renumber the column or drop and readd it. Then some of our CBT quizzes won't work anymore because the query specific records based on this autonumber primary key reference field..

At this point, any and all suggestions would be greatly appreciated.

Sep 14 '06 #1
2 2683
1,418 Expert 1GB
Yeah, :)

This arrives when you use an append or an update query that fills in the field of id...

See your action queries to not have more problems with this...

And to correct your problem make an append query!

Choose as column your id number and manually enter the last value in your table...

Your append query haven't to be based on a table... Just on one single value - your last ID...

Than run the query... There aren't new records in your table because there will be an error in your referential integrity, but the autonumber will be correct :)


Have a nice day!

Sep 16 '06 #2
Thanks PEB,

Sorry it took awhile to reply back. Your solution worked like a charm. Everything is working fine again. Thanks again - Appreciate it.
Sep 20 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by Alan Lane | last post: by
4 posts views Thread by Ed_P | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.