Suppress confirmation messages in Macros

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
 
N

Nikos Yannacopoulos

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
 
S

Steve Schapel

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top