Append duplicates into table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I am trying to import data from a csv file and append it to another table.
Firstly, I import to a table. Then, using an Append query, I insert these
fields to the correct table.
When running the queries manually, If the values I am importing are
duplicates, then I am informed of this and that x amount of records will not
be updated. I am then asked if I want to continue with the update.
However, When I try to run the queries in VBA using the DoCmd.OpenQuery
function, I get an error that I dont know how to resolve (number 2496). How
do I get it to just update the non duplicate values?
Thank you
 
You can modify your query, so it append only non-duplicate value - you can
use left join to link both tables by unique field(s) and set criteria that
values on destitation table is null
HTH
 
Excellant.. That works perfectly.

I dont suppose there is a way to capture the number of rows that the query
will append is there? I can then match this back to the table I have
imported to and see if the values match (this will highlight duplicates that
wont be appended)
 
Back
Top