Merging access data to a Word Merge doc

L

lcollins

I have form letters in Word that I merge with data from queries in Access.
This works unless you have an [ask] parameter in the query. I'm looking for
a work-around. I tried building an event that ran the query first but it
creates a conflict when the Word doc tries to run the query. Is there
another way using Build Event or a macro to use data from an [ask] query in a
mail merge doc in Word?
 
P

PieterLinden via AccessMonster.com

lcollins said:
I have form letters in Word that I merge with data from queries in Access.
This works unless you have an [ask] parameter in the query. I'm looking for
a work-around. I tried building an event that ran the query first but it
creates a conflict when the Word doc tries to run the query. Is there
another way using Build Event or a macro to use data from an [ask] query in a
mail merge doc in Word?

Create an unbound form, put a textbox in your form and format it so it's the
same type as the parameter your query is expecting. Then modify the query so
that it points at the open form...

SELECT field1, field2
FROM MyTable
WHERE field3 = Forms![MyForm]![ControlNameOnForm]

Then use that as the source query.

Or use Albert's Super Easy Word Merge...
http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top