Hiding Warning Message?

JPritch

Registered User.
Local time
Today, 11:35
Joined
Jan 7, 2005
Messages
54
I have a macro that is run via button on my switchboard. It is set to import data from an Excel spreadsheet and then run an append/update query.

Everything works fine, but I get a pesky Microsoft Access message saying:

Microsoft Access was unable to append all the data to the table.

The contents of fields in 0 records were deleted, and xxx records were lost due to key violations.


I'm getting the records lost, which is no biggy, because I have primary key values that I don't want overwritten..

I was only able to turn off the "You're about to update xxx records, are you sure" message.

But how do I cut this message off? If I were the only one using this database, I would leave it alone. But I don't want to alarm some poor user thinking they corrupted my database!
 
To JPritch:
In the macro builder you have the option under action to select the
following to turn off warnings. Its is SetWarnings and set the warnings on
to a no. then place this macro above the append query action in your
macro.
Macro editor looks something like this:
Macro Name Action Comment
upqryfrm1 Echo Sets echo commands to no
SetWarnings Set warnings to no
OpenQuery Runs the append query
---------------------------------------------------------------------
the above is just a example macro that would be run from on click or
on open command in the properties of form or report.
Hope this helps, Flixx
 
JPritch,

you'll have to trap your error and to resume.
You'll need to use VBA as macro's don't enable you to trap any errors...

RV
 

Users who are viewing this thread

Back
Top Bottom