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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word and Access Variable Sharing

Status
Not open for further replies.

Telsa

Programmer
Jun 20, 2000
393
US
I have a form where I have a button that will cause Word to open up and open up a document that contains fields to be populated by a query based on the current record the user is on in the form.

I want to have a field of that record be deciding factor on the populating of the word document. So I need to know how to share that information with Word.


Specifically, how do I take a variable created in Access and pass it to Word to keep as a variable????

Any ideas anyone???

Thanks!

Mary :eek:)


 
See the post "Sharing a variable from one time to next" in this forum. There is information on using an .ini file. This will work the same from any VBA application (Excel, Word, Access).

You can write a variable out to an .ini file from Access, and read the variable from the .ini file from Word. You will need to copy the GetINI and WriteINI functions into both Access and Word.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top