Execute Existing Query Programattically

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

Guest

I was wondering...I have a number of queries created, some of which make new
tables, etc. I was wondering if there is any slick/easy way to execute a
number of existing queries right inside VBA code (as opposed to create a
massive number of docmd.SQLRun routines).

Thanks!

PatK
 
I was wondering...I have a number of queries created, some of which make new
tables, etc. I was wondering if there is any slick/easy way to execute a
number of existing queries right inside VBA code (as opposed to create a
massive number of docmd.SQLRun routines).

Thanks!

PatK

If the queries already exist, just use:
DoCmd.OpenQuery "Query1"
DoCmd.OpenQuery "Query2"
etc.
 
Thanks Guys! That I did not know about the OpenQuery. There is so much
that, unless you know it exists, you can't know to use it! Yet nothing to
tell you it exists, either (except kind folks like yourselve!).

Thanks!

Patk
 
Back
Top