What I am trying to accomplish is to open a word document from access and publish the results of a query into a table in word. I have 2 problems
When I try to instantiate word with
Private Sub cmdOutputCorel_Click()
Dim wordapp As Application
Dim rst As ADODB.Recordset
Set wordapp = word.Application
DoCmd.SetWarnings True
I get an error at set wordapp = word.Application
Second I think I need to stay with ADO for my access recordset. How do I declare a recordset based on a stored query using ADO.
The way that I normally open a recordset is
dim db as database
dim rs as recordset
set db = Currentdb
set rs = db.OpenRecordset("Stored Query Name"
If I try to use that I get a user defined type not defined at dim db as database.
When I try to instantiate word with
Private Sub cmdOutputCorel_Click()
Dim wordapp As Application
Dim rst As ADODB.Recordset
Set wordapp = word.Application
DoCmd.SetWarnings True
I get an error at set wordapp = word.Application
Second I think I need to stay with ADO for my access recordset. How do I declare a recordset based on a stored query using ADO.
The way that I normally open a recordset is
dim db as database
dim rs as recordset
set db = Currentdb
set rs = db.OpenRecordset("Stored Query Name"
If I try to use that I get a user defined type not defined at dim db as database.