Auto yes/no replies

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all

I'm trying to run queries that create/delete queries. I want the yes/no
question that pops up to be automatically answered as "yes" but I don't want
to use the "Tools->options" option that does this (need it for other stuff)

I believe that, using a macro, theres's a macro command/option that does
this, but I can't find it... can anyone help?

Thanks for any assistance.
 
did you mean to say "queries that create/delete *records*"? and you're
talking about the messageboxes that ask you to confirm the addition or
deletion of records in the table?

if yes to both of the above questions, then what you're looking for is the
SetWarnings macro action. add the action immediately before the OpenQuery
action in your macro, to "turn off" the warning message. note that if you
use the SetWarnings action in VBA code, you also need to use the SetWarnings
action immediately *after* the OpenQuery action to turn warnings back on, as
this will not happen automatically in VBA.

hth
 
tina said:
did you mean to say "queries that create/delete *records*"? and you're
talking about the messageboxes that ask you to confirm the addition or
deletion of records in the table?

if yes to both of the above questions, then what you're looking for is the
SetWarnings macro action. add the action immediately before the OpenQuery
action in your macro, to "turn off" the warning message. note that if you
use the SetWarnings action in VBA code, you also need to use the SetWarnings
action immediately *after* the OpenQuery action to turn warnings back on, as
this will not happen automatically in VBA.

Exactly what I needed! Thank you very much.
 
Back
Top