From: Aaron on 10 May 2010 12:51 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
From: Dirk Goldgar on 10 May 2010 13:02 "Aaron" <Aaron(a)discussions.microsoft.com> wrote in message news:8B98EC01-C5EB-4CD8-943E-B5CFD626876D(a)microsoft.com... >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. -- Dirk Goldgar, MS Access MVP Access tips: www.datagnostics.com/tips.html (please reply to the newsgroup)
From: Marshall Barton on 10 May 2010 13:26 Aaron wrote: >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? Use the Execute method: Dim db As Database Set db = CurrentDb() db.Execute qrydeleteopencounts, dbFailOnError , , , -- Marsh MVP [MS Access]
|
Pages: 1 Prev: Filter Form on Combo Variable Next: raise form events programmatically |