Only problem is passing the data from Access to Word so Word can use that data in Word's VBA code.
I have two queries in Access 2013 64bit, Win7, VBA 7.1 Word 2013 64 bit, Win7 VBA 7.1
One qry returns only one string.
Second qry returns many more, current number of rows is 215 and growing and this qry has parameters to maybe narrow that number.
I have been using the code below in a
Word Document UserForm to call this Access database that holds the info.
Dim MyPath As String
Dim MyObject As Object
MyPath = CStr("C:\Users\Mark\Documents\NameFinder2.accdb")
Set MyObject = GetObject(MyPath)
MyObject.Visible = True 'seems needs to be True to see form.
MyObject.DoCmd.OpenForm "frmTblLands" 'this does open frmTblLands in the database.
It is as though I opened Access from a Desktop short cut. All features useable.
IF I could figure out anyone of these possible ways to get the info from Access to Word VBA I would almost be done.
1. In Word VBA refer to a TextBox on a Access Form to get the single value, after Access runs a qry or other code.
2. In Access declare a Public Variable1 in a standard module. Then elsewhere in Access assign value to Variable1.
Then Back in Word use that Same Public Variable1 in Word VBA code.
3. If I can do # 2, then I figure I could Also declare in a standard module in Access, Public Arrary1, holding all the rows returned by QryManyRows in Access. Elsewhere in Access, parameters passed to QryManyRows, then Arrary1 gets rows
of qry.
Mark J