MS Word Mail Merge and MS Query...

T

Timothy LoGrasso

Problem statement: Originally I was trying to use MS
Access as the query engine, however that will not support
parameter queries. So, I built the query in MS Query.
When I use this query as the datasource, MS Query
launches, and once I make MS Query the active window I'm
prompted for the paramaters. I'm then asked if I want to
open this query every time I open the data source. I'm
not sure what exactly this means but it doesn't matter
because regardless of what I choose, I get the same error
dialogue. "Word was unable to open the data source"

Question: How can this be? The query runs properly in MS
Query. I'm prompted, as desired, for paramaters. How
should I troubleshoot this issue?

Thanks!

Tim
 
P

Peter Jamieson

I'm then asked if I want to
open this query every time I open the data source.

In this case, the choice is between the following:
a. You save the query specification as a .dqy file. When MS Query returns
the connection info. etc. to Word, it says the data source is the .dqy. When
Word needs to get the real data, it starts MS Query and uses DDE to tell it
to open the .dqy file, execute the query, and return the data.
b. You don't save the query specification as a .dqy file. When MS Query
returns the connection info. to Word, it provides the raw connection info.
to the underlying database. When Word needs to get the real data, it goes
directly to the underlying database and does not go via MS Query at all.
Question: How can this be? The query runs properly in MS
Query. I'm prompted, as desired, for paramaters. How
should I troubleshoot this issue?

Unfortunately MS Query was originally designed for use with MS Excel, and
not all of its features can be used with MS Word. Parameter queries seems to
be one of those features. Pity.

However,
Problem statement: Originally I was trying to use MS
Access as the query engine, however that will not support
parameter queries.

Access does support parameter queries but in order to use them from Word you
have to connect using DDE - in Word 2000 you can do that by checking the
"Select method" box in Open Data Source. In Word 2002 and later you have to
check Word Tools|Options|General|"Confirm conversions at open" then go
through Select Data Source again.
 

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