Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / March 2007

Tip: Looking for answers? Try searching our database.

Table Autonumbering Not Working Properly

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chaplain Doug - 28 Mar 2007 16:04 GMT
Access 2003.  All of a sudden in a database that has worked fine for years,
the primary autonumber key in a table is assigning a number that has already
been used.  The primary autonumber key goes up to 863.  When I go into the
table and try to add a record at the end, it tries to assign a value of 793
to the primary key, which is a number that has already been assigned to a
previous record.  Of course I get an error and the record cannot be added.  
How might this happen and how can I fix it?  Thanks for any help.
Signature

Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org

Chaplain Doug - 28 Mar 2007 16:28 GMT
The same problem is occurring in another table in my database that has an
autonumber primary key.  It too is trying to assign already assigned primary
key values, and of course is erroring out.  What could be my problem?
Signature

Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org

> Access 2003.  All of a sudden in a database that has worked fine for years,
> the primary autonumber key in a table is assigning a number that has already
[quoted text clipped - 3 lines]
> previous record.  Of course I get an error and the record cannot be added.  
> How might this happen and how can I fix it?  Thanks for any help.
Ken Sheridan - 28 Mar 2007 17:04 GMT
Take a look at the following MSKB article:

http://support.microsoft.com/kb/291162/

Ken Sheridan
Stafford, England

> The same problem is occurring in another table in my database that has an
> autonumber primary key.  It too is trying to assign already assigned primary
[quoted text clipped - 7 lines]
> > previous record.  Of course I get an error and the record cannot be added.  
> > How might this happen and how can I fix it?  Thanks for any help.
Chaplain Doug - 28 Mar 2007 17:54 GMT
Thanks Ken.  It appears that I have the latest service pack for Jet Engine
4.0, namely,
4.0.8618.0 Windows XP SP2 and Security Bulletin MS04-014

What I found fixed the problem was to do the following:

1.  Create a blank database in Access.
2.  Import all the tables from the backend of the databse that was having
autonumber problems.
3.  Replace the "bad" backend with this new database.

The autonumber fields now give the values they shouldm i.e., incrementally
from the last number assigned.
Signature

Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org

> Take a look at the following MSKB article:
>
[quoted text clipped - 14 lines]
> > > previous record.  Of course I get an error and the record cannot be added.  
> > > How might this happen and how can I fix it?  Thanks for any help.
John W. Vinson - 28 Mar 2007 17:54 GMT
>Access 2003.  All of a sudden in a database that has worked fine for years,
>the primary autonumber key in a table is assigning a number that has already
[quoted text clipped - 3 lines]
>previous record.  Of course I get an error and the record cannot be added.  
>How might this happen and how can I fix it?  Thanks for any help.

This is a known bug; you need to update JET. See

http://support.microsoft.com/kb/291162/en-us

            John W. Vinson [MVP]
dbahooker@hotmail.com - 28 Mar 2007 21:08 GMT
JET IS A KNOWN BUG

USE ACCESS DATA PROJECTS

On Mar 28, 9:54 am, John W. Vinson
<jvinson@STOP_SPAM.WysardOfInfo.com> wrote:
> On Wed, 28 Mar 2007 08:04:04 -0700, Chaplain Doug
>
[quoted text clipped - 12 lines]
>
>              John W. Vinson [MVP]
Chaplain Doug - 29 Mar 2007 00:36 GMT
Dear John:

I posted a reply earlier in this thread that indicated my update level.  It
appears that I am beyond the Jet SP8 referred to in the article.  Namely,

4.0.8618.0 Windows XP SP2 and Security Bulletin MS04-014

Am I mistaken in this?
Signature

Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org

> >Access 2003.  All of a sudden in a database that has worked fine for years,
> >the primary autonumber key in a table is assigning a number that has already
[quoted text clipped - 9 lines]
>
>              John W. Vinson [MVP]
Tony Toews [MVP] - 29 Mar 2007 01:05 GMT
>Access 2003.  All of a sudden in a database that has worked fine for years,
>the primary autonumber key in a table is assigning a number that has already
[quoted text clipped - 3 lines]
>previous record.  Of course I get an error and the record cannot be added.  
>How might this happen and how can I fix it?

Resetting AutoNumbers
http://www.allenbrowne.com/ser-40.html

ACC2000: AutoNumber Field Duplicates Previous Values After You Compact and Repair a
Database  
http://support.microsoft.com/?kbid=257408

AutoNumber Field Duplicates Previous Values After You Compact and Repair a Database
http://support.microsoft.com?kbid=291162

Tony
Signature

Tony Toews, Microsoft Access MVP
  Please respond only in the newsgroups so that others can
read the entire thread of messages.
  Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm

Chaplain Doug - 29 Mar 2007 14:34 GMT
Thank you Tony.  The code provided at:

Resetting AutoNumbers
http://www.allenbrowne.com/ser-40.html

Works well.  It is SOOO much easier than the Microsoft solution provided in
Access help.
Signature

Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.orgResetting AutoNumbers

> >Access 2003.  All of a sudden in a database that has worked fine for years,
> >the primary autonumber key in a table is assigning a number that has already
[quoted text clipped - 15 lines]
>
> Tony
Tony Toews [MVP] - 29 Mar 2007 18:36 GMT
>Thank you Tony.  The code provided at:
>
[quoted text clipped - 3 lines]
>Works well.  It is SOOO much easier than the Microsoft solution provided in
>Access help.

You're welcome.

Tony
Signature

Tony Toews, Microsoft Access MVP
  Please respond only in the newsgroups so that others can
read the entire thread of messages.
  Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.