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!

Run an MS Access query from Excel

Status
Not open for further replies.
Jul 21, 2009
29
US
I need to run an append query in MS Access from Excel.

The research I have done goes on about doing far more complex things in Access from an Excel macro, but not how to just run a query.

I want to use DAO (I think).

I think I start with

dim db as DAO.workspace
dim qry as DAO.queryDef

Then I get really shaky. Maybe something like:
Set db = "C/desktop/richard/rdb.mdb" 'set the name of the Access db
Set qry = "TempRP" 'set the name of the query
Run qry

I have little doubt that this will not work as set out but cannot find in my books or on line how to run a query in Access from Excel.

Am I close? What changes will make this actually work?

Does Access need to be open for this to work?

If I need to first open the Access application, do I need to worry about the standard warning that security is set high and deal with options to say it is okay to trust this database?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top