Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running a query in a macro

Status
Not open for further replies.

netcashin

Programmer
Nov 13, 2000
159
US
This is probably and easy answer but I haven't dealt much with Access macros.

I have created some queries saved in Access. I am wishing to run the queries from one macro. How to I call the queries in the macro.

thanks
 
Hi!

Use either the RunSQL action or the OpenQuery action.

hth
Jeff Bridgham
 
Using the RunSQL option, how do I call the saved query?
 
Hi!

Well, you have two options. Go to your saved query and open the SQL view. Copy the SQL and then paste it into the appropriate box of the macro. Or you can use the OpenQuery action and just click on the dropdown arrow and choose the query you want to open.

hth
Jeff Bridgham
 

RunSQL doesn't run saved queries. It runs SQL code. Use the OpenQuery action to run a saved query from a macro. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top