rjmccafferty1
MIS
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?
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?