Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why is the PK duplicating?

Status
Not open for further replies.

wabtrainer

IS-IT--Management
Feb 4, 2002
66
GB
I have a table with the Primary Key set as an Auto Number.
However, as I enter a new tuple, it is using a number already used as a PK in the same table with the effect that I cannot add to my table.
The PK is set to index (No Duplicates) oviously as it is the PK, so why is autonumber producing duplicate numbers?
Any ideas?? If you want to be a bear:
Be a Grizzly!
 
well, if you madethe autonumber after importing records, or just made the autonumber after there were records in there already that can cause this problem...

-- Junior JHauge@jmjpc.net
Life is change. To deny change is to deny life.
 
OK I can see this.
Is there a way to reset the numbering and cascade that to the many side of a 1:n relationship? If you want to be a bear:
Be a Grizzly!
 
well, you can make a new table, make the autonumber... then use an append query... just make sure that the two tables are identicle... and make sure the autonumber is in place befor any data goes in there....

what you are going through is exacly why many people hate auto numbers... i use them but am very carefull with them...

--Junior JHauge@jmjpc.net
Life is change. To deny change is to deny life.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top