Suppress confirmation messages in Macros

  • Thread starter Thread starter Dave Venus
  • Start date Start date
D

Dave Venus

Hi!

I am using openquery to run a delete query and an insert
query. They generate messages like "You are about to
delete X records" or "you are about to insert X records"
or "Cannot add a record due to duplicate keys". Can these
messages be suppressed? If so how?

Thanks in advance for any help!

Dave Venus
 
Dave,

In your macro, precede the action queey action with a SetWarnings one,
argument False. After your action query(ies) action(s), use it once more,
this time with argument True, so yourestore the previous status. otherwise
whatever you do from there on will go through without Access asking for
confirmation.

HTH,
Nikos
 
Dave,

Put a SetWarnings/No action in your macro before the first OpenQuery
action. This will suppress the display of the action query confirmation
messages. Warnings is automatically restored to Yes at the end of the
macro, so no need to explicitly turn it on again.
 
Back
Top