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

Acces to Word Mail Merge Problem

Status
Not open for further replies.

monnet

IS-IT--Management
Feb 5, 2007
9
0
0
US
Currently I have a database using MS access that populates multiple letters via the MS word mail merge tool from a query in access.

Each day the query (date) needs to be by an end-user. So I created a form and linked it to the query ([Forms]![Date filter table]![Date]).

However, when I do that, every time I open the query this following message "Parameter data Value" pops up (asking me for the input date).

Also after creating the form that links to the query, word can no longer see the query via it mail merge tool, thus rendering my query useless. I think the link to the Form ties up the query thus making it invisible to word.

Any ideas on how to resolve this? Maybe a VB code?


Thanks so much
 
If you're comfortable with VBA and SQL, I'd recommend using my Mailmerge code: faq181-5088

If you have complicated requirements (e.g. pull data from the user/a form), dropping into VBA is the only clean way to get this done.

If you're not comfortable with VBA, you can instead store the date value in some kind of table, and have your query pull data from the table instead of from the form. This will work around your problem (though you'll find new problems).
 
pseale,
The using a table as my source for the query did not solve the problem, still see the enter parameter screen in access. While i am failry strong in SQL, I am not the best VB programmer, but I will try the VB approach... thank you very much for the help!
 
did you change the query so your where clause is:
Code:
WHERE SomeDateField = [Forms]![Date filter table]![Date]
Is the form open when you run the query?

Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for database developers:
The Fundamentals of Relational Database Design
Understanding SQL Joins
 
If you're going the "pure data" route, I'd recommend you try running the query with all forms closed. You need to be able to run the query without it popping up any parameters or assuming there are any open forms.

This is essentially how Word's mailmerge sees Access.


I also think (I'm fuzzy on Word itself) there's a setting in Word you can set so that when it pulls data from Access, it uses the existing Access window instead of creating a new one. This would totally fix your problem, assuming you can find the setting in Word.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top