P
PDJ
I'm trying to use Word to build a table from data stored in a parameter
query in Access (both 2003). Access will open the Word doc via VBA and run
the relevant code in Word to build the table.
Can anybody let me know how best to pass the relevant variable from Access
to Word? I've searched all over for this and can't see any pointers anywhere.
Here's the code I have so far:
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim databasename As String
Dim qd As QueryDef
databasename = "C:\IFA Database\1 Database\IFA Database.mdb"
Set db = OpenDatabase(Name:=databasename, ReadOnly:=False)
Set qd = db.QueryDefs("qryGPPRWLBeneficiaries")
qd.Parameters("[Forms].[frmGPP].[PolicyID]") = (PROBLEM HERE)
Set rs = qd.OpenRecordset
If there is a better way of doing this, I'd be happy to be pointed in the
right direction.
Thanks
PDJ
query in Access (both 2003). Access will open the Word doc via VBA and run
the relevant code in Word to build the table.
Can anybody let me know how best to pass the relevant variable from Access
to Word? I've searched all over for this and can't see any pointers anywhere.
Here's the code I have so far:
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim databasename As String
Dim qd As QueryDef
databasename = "C:\IFA Database\1 Database\IFA Database.mdb"
Set db = OpenDatabase(Name:=databasename, ReadOnly:=False)
Set qd = db.QueryDefs("qryGPPRWLBeneficiaries")
qd.Parameters("[Forms].[frmGPP].[PolicyID]") = (PROBLEM HERE)
Set rs = qd.OpenRecordset
If there is a better way of doing this, I'd be happy to be pointed in the
right direction.
Thanks
PDJ