Hi,
If I append data from one table into another using a query, I get the following message:
"Test2008...didn't add...15 records due to validation rule violations."
Fine, I can work out why this is.
The problem is that I want to incorporate the append function into a generic VBA procedure. I create the SQL and then use:
Set qdfAppendQuery = dbCurrentDatabase.CreateQueryDef("", strSQL)
qdfAppendQuery.Execute
The append fails as expected and qdfAppendQuery.RecordsAffected = 0.
The problem is it doesn't appear to generate any trappable error. How can I give the user a clue as to what has happened?
If I append data from one table into another using a query, I get the following message:
"Test2008...didn't add...15 records due to validation rule violations."
Fine, I can work out why this is.
The problem is that I want to incorporate the append function into a generic VBA procedure. I create the SQL and then use:
Set qdfAppendQuery = dbCurrentDatabase.CreateQueryDef("", strSQL)
qdfAppendQuery.Execute
The append fails as expected and qdfAppendQuery.RecordsAffected = 0.
The problem is it doesn't appear to generate any trappable error. How can I give the user a clue as to what has happened?