Export to word

  • Thread starter Thread starter Emma
  • Start date Start date
E

Emma

I know I posted this before on Friday but I can't seem to find it now. How do
I make a report open in Word straight from a button on the database? I have a
form letter I would like the fields to be populated into.
 
This helps but I have two quick questions. 1. Where do I put this code? and
How do I include information from another table. 2. If I use a query instead
of a table how do I attach this file you've given me to the query?
 
Hi Arvin can you explain to me which fields come from the database do
"CompanyName" and "FirstName"? And which fields go into the word document, I
assume its (Me.txtComanyName) and (Me.txtPersonFirstName)? Am I thinking
backwrds on this?

Thanks Emma
 
1. Put the code in the form that has the data that you wish to pass to Word.

2. Base the form on the query instead of a table. It should work the same.
 
I think that you have it correct.

"Me" is a shortcut for:

Forms!FormName

and works within the form. From outside the form, you must use the first
syntax.

"txtCompanyName" is the name of the textbox control that holds the
CompanyName field in the form.
 
Back
Top