Hello.
I am using the following code to run an append query on another table
Dim db As DAO.Database
Set db = DBEngine.Workspaces(0).OpenDatabase("R:\DEPT-BR\CONSUMER LENDING\Marketing Campaigns\2015\2015 Auto Prequal Campaigns\August 31 Mailing\Auto Loan Prequalification - August 31 2015.accdb")
db.Execute "qry_08312015 Auto Loan Prequal Results - Append", dbFailOnError
Set db = Nothing
It works great .... except when it finds dupes. I have two fields in the table the data is appending to as the primary keys to obviously prevent dupes, but some of the records in the append are not duplicates.
So my ?s
1.) Does this Run-time error prevent all records from being appended or just the dupes?
2.) How can I suppress the error? I tried DoCmd.SetWarnings False to no avail.
Thanks.
I am using the following code to run an append query on another table
Dim db As DAO.Database
Set db = DBEngine.Workspaces(0).OpenDatabase("R:\DEPT-BR\CONSUMER LENDING\Marketing Campaigns\2015\2015 Auto Prequal Campaigns\August 31 Mailing\Auto Loan Prequalification - August 31 2015.accdb")
db.Execute "qry_08312015 Auto Loan Prequal Results - Append", dbFailOnError
Set db = Nothing
It works great .... except when it finds dupes. I have two fields in the table the data is appending to as the primary keys to obviously prevent dupes, but some of the records in the append are not duplicates.
So my ?s
1.) Does this Run-time error prevent all records from being appended or just the dupes?
2.) How can I suppress the error? I tried DoCmd.SetWarnings False to no avail.
Thanks.