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

Mail Merge to Word using Access query and form

Access Howto:

Mail Merge to Word using Access query and form

by  DougP  Posted    (Edited  )
Note: this FAQ was written for Word 2000. Word 2002 and 2003 will have slightly different menu options.

The scenario:
An Access form is setting on ONE record you want to merge with a Microsoft Word doc.
Creating a query is the key to making this work. The query is looking at the form and can have other tables beside the one the form is connected to.
The Word doc then mail merges to the query.
Lastly look at FAQ number
faq181-28
to create a button on the Access form which will launch Word and your Doc merged to the correct record. Lastly you can automate the whole thing by having a macro in Word that prints the document and closeÆs Word. This will return you back to Access ready for the next record.

Here is a step by step example:

1. Have a form in Access that the user can find the record to merge. Then create a query whose criteria is looking at that form. such as [Forms]![frmname]![uniquefieldname]
The query can have other tables in it too. But it needs to return one record. So the query has ALL of the data to go in your Word doc.
2. Open Word and the Doc to receive the data
3. In Word click ôtoolsö menu then ôMail Mergeö
4. Click ôCreateö button, ôForm Letterö, ôActive windowö
5. Click ôGet Dataö button below Create button
6. Click ôOpen Data sourceö
In ôFiles of typeö at the bottom find ôMS Access Databases (.MDB)ö
7. In the ôLook Inö dropdown box (at the top) find your drive
Go find your .MDB where ever it is it can be on the server or anywhere.
8. You will see a dialog box click on the ôQueriesö tab and find your query.
9. Click OK (Now this could take a while)

Now to view just that one record click the depress the <<ABC>> mail merge button in Word. This is on the Mail Merge toolbar that opens when you merge data.
Save the Word document with the <<ABC>> button depressed then when you open the document it will be on the record that is showing in Access.

One other tip NEVER Open the Merged word doc without having Access open to the form too. Other wise you will get a mess of errors relating to ôcanÆt find data sourceö and end up ruining all the work you put into created this in the first place.

Note: if you have a lot of data fields in the Word doc
I strongly suggest you create a report in Access (instead of mail merging to Word) that looks just like your
word document (it can be done)

I used this method for several years from Access 2.0 to 2000

;-)
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top