Running Apend,Delete and Make queries with VB

  • Thread starter Thread starter Aaron
  • Start date Start date
A

Aaron

I have a macro that I run 4 difference query updates with.

qrydeleteopencounts (Delete Query)
qryMakeTableCYCDATECOPY (Make Table Query)
qryAppendProductionMSList (Append Query)
qryAppendFGList (Append Query)

Is there a easier why to do this so I do not have the click "Yes" a dozen
times while running this macro?

Thanks,
Aaron
 
Aaron said:
I have a macro that I run 4 difference query updates with.

qrydeleteopencounts (Delete Query)
qryMakeTableCYCDATECOPY (Make Table Query)
qryAppendProductionMSList (Append Query)
qryAppendFGList (Append Query)

Is there a easier why to do this so I do not have the click "Yes" a dozen
times while running this macro?


So you have a macro that uses the OpenQuery action 4 times? How do you get
a dozen confirmation dialogs? You can use the SetWarnings action to turn
off warnings before your first OpenQuery, and then use SetWarnings to turn
them on again after the last OpenQuery. Note: I believe warnings are
automatically turned on again at the end of an executing macro -- unlike
what happens in VBA code -- but it's a good practice to make *sure* you
always turn them on again after you've turned them off.

If it were me, I would do this process via VBA code instead of a macro,
because that provides a better way of running the action queries without
getting any confirmation dialogs.
 
Back
Top