Append table with autonumber primary key

AllieQ

New member
Local time
Today, 21:48
Joined
Apr 22, 2015
Messages
1
Hi I am new to access and I am trying to append new records to a table from an imported table. Both the tables have an auto number primary key but because there have been deletions from the data supplying the second table (table 4) they are out of sync so I cannot append due to duplicate primary keys.

E.g table A has primary key autonumbers 1 - 100
table b has primiary key numbers 1 - 100 but because records 1 - 10 were deleted from the source data record 1 in table A and record 1 in table b are different. I have 10 new records to add (90 - 100 in table b) but because this primary key number is already used its failing. This was working fine until records from the source data were deleted making the data out of sync. Any help appreciated
 
create a new column (type long) in your destination table and when importing put the imported PK there and let Access create a new ID

then any other tables that work of the 'old' PK can be updated with the new one
 

Users who are viewing this thread

Back
Top Bottom