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
 

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

Back
Top