append query sending primary key error

  • Thread starter Thread starter Brian
  • Start date Start date
B

Brian

Hello,
Is there any way to not get error messages noting primary
key violations? I am running a macro that dumps all of
my flagged data into a new table so I can check it for
accuracy before it goes into my final table. It attempts
to dump rows with similar primary keys into this table.
I'm okay with that. It's just that my macro has 30
queries so I have to Okay each one when I get the
message..."didn't append due to (x) primary key
violations". Is there a way to get rid of this message
box??
 
Nevermid I think....
Our data manager told me to take off the primary keys in
that table...it work well now!!
thanks
 
Nevermid I think....
Our data manager told me to take off the primary keys in
that table...it work well now!!
thanks

BZZZZT! Wrong Answer!!!

That's like giving a heart attack patient morphine so the chest pain
doesn't bother him!

Instead, put your primary keys back on, so you don't end up with tons
of duplicate data in your tables (that's what the key is FOR).

In your macro put a line

Setwarnings On

before the first query, and

Setwarnings Off

after the last. This will suppress the warning messages... while
preserving the integrity of your data.
 
Back
Top