Access Message

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

Guest

When I run an Update or Append query, I have gotten a message from Access
that basically says that it cannot update the "destination" table because of
several reasons like validation rule errors, key violations, etc.

Is there a way I can write a query that will show the records from the
"source" table that are referred to in this error message?

Thanks.
 
Your key violations are probably duplicates. Create a query that finds
matching records from the two tables.

Your validation rule errors can be found by creating a select query with
criteria <> the validation. If validation is "Between 40 and 60" then set
criteria as "Not Between 40 and 60" to find violations.
 
Thanks for the feedback.

If I am following your comment correctly, the problem is that there could be
many fields with any or all of the errors mentioned (key, validation, etc).
That could mean many queries to try to resolve this.

I would think Access should produce some sort of a listing of "bad" records
as part of the error message. Something similar to what happens when
importing data to at table. Or at least indicate the field(s) that are
causing the errors.

Thanks.
 
If you open the table in datasheet view and copy, then open the destination
table in datasheet view and click on menu EDIT - Paste Append it will append
and place any error records in a table named Paste Errors.
 
That sounds like it would work well for an Append query. It does not sound
like it would work for an Update query.

Also, I am running (trying) these queries from VBA. Can this Edit-Paste
Append idea be run from VBA?

The confusing part for me is that the raw data imports into the table with
no errors. Both tables have identical structures for Required, Validation,
etc. but I occasionally still get the error.

Thanks.
 
Back
Top