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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access query from excel VBA

Status
Not open for further replies.

BChumie

Programmer
Jan 11, 2002
130
US
Hello,

Can I run an access query from VBA? If so, could I please get some direction on how to do this?

Thanks,
Brad
 
Brad,

Try this line:

DoCmd.OpenQuery "queryname"

Kelly
 
Thank Kelly,

That works in Access but It doesn't work if I am trying to open that query from excel. I am sorry I was unclear on how I asked the question. Basically I need to run a macro in excel that will run a macro in Access then return back to excel to distribute some data.

Brad
 
Oops. this is why it helps to read the subject line of the post! [blush]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top