Dear Ken:
The way I'd suggest handling this is to remove the attempts to add
rows illegally. There are several causes for this, from which you
have apparently identified those that cause the problem. These
include:
- attempting to add a row which duplicates a unique key in the
destination table
- attempting to add two or more rows that share a unique key in the
destination table
- attempting to add a row that would violate a foreign key
relationship
- attempting to add a row containing a null value in a required column
These, and any other violations, should be removed from the set of
rows being added. Don't do this by deleting them from the source
table, but by filtering them from the set being appended. The same
filtering can be used to create a report of the rows not added, or to
handle them in some other way, just reversing the logic.
I get this message - and I know why I get it.
But I am trying to turn it off and handle the error myself
and avoid this pesky prompt.
Anyone know how to suppress this message?
On Error does not seem to work although it returns a 2501
error code.
Ken Higgins
Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts