Mailmerge from Access

J

JohnB

Hi. Ive tried posting this on the Access newsgroups with little response. I
wonder if its something that might ring a bell here.

I have a command button on a form in my Access 2002 database that is set up
to open up Word, with a Hyperlink address to the Mail Merge Main document.
This works perfectly well on those mail merges that are fed from standard
queries - I
have quite a few in my database. But now that Ive introduced a parameter into
one of the queries, which prompts the user to specify a value for a certain
field, the Word Application opens with a blank screen and only by minimising
it can the user see the little window asking them the queries parameter
question. On answering this, the merge proceeds - after opening the Word
window again, that is.

So the problem is that the queries parameter window opens up first, then is
instantaneously overlaid with the Word window. I just wondered if this is
normal, or whether I can get the parameter window to open on top of the Word
window, so that the user knows that a question needs to be answered.

Thanks for any help, JohnB
 
P

Peter Jamieson

I just wondered if this is normal,

It is normal - and irritating - but I do not know how you can /easily/ work
around it. In a later thread you mention that someone suggested you try
using MS Query, but unfortunately that mechanism will not work with Word.

I have never tried to solve this particular question. I doubt if trying to
manipulate the z-order (i.e. which window in front of which) will work. I
suppose I would try one of the following:
a. get the parameter from the user while still in Access, and
programmatically generate the necessary query, then connect to it. Not very
nice IMO.
b. get the parameter from the user via a userform in Word, then build and
issue the necessary Jet SQL directly in a Word OpenDataSource call. Not very
nice either, but perhaps doable.

Peter Jamieson
 
J

JohnB

Thanks for this Peter.

Hmmm. Everything seems to point to it working in word i.e the Help screen
specifically directs you to open a word document, then to construct an MS
Query linked to the Access db. Another help screen describes how to
introduce a parameter into the MS query. OK, it fails somehow when you put
the parameter in but everything suggests that it should work.

Do you really mean to say the MS Query is not designed to work with Word?

Im afraid you other suggestions are a bit beyond me but thanks for your
time.

Id really like to get MS Query working - not because this particular mail
merge is a show stopper but because I didnt realise MS Query existed and I
just want to see it go.

Thanks again, JohnB
 
P

Peter Jamieson

Hmmm. Everything seems to point to it working in word i.e the Help screen
specifically directs you to open a word document, then to construct an MS
Query linked to the Access db.

Yes, that bit works.
Another help screen describes how to
introduce a parameter into the MS query.

Yes, that bit works when you use MS Query on its own.
OK, it fails somehow when you put
the parameter in

....and that's the problem.
but everything suggests that it should work.

Yes, but the reality is that whatever the various bits of documentation say
about each part of the process, when you put everything together, it doesn't
work. Since I'm not privy to the inner workings of Word, I can't tell you
why it doesn't. All the features necessary to make this work appear to me to
exist. If you manage to find a way to do it, please do post your findings
back here!
Do you really mean to say the MS Query is not designed to work with Word?

As far as I know, MS Query was originally designed to work with Excel (MS
originally called it "Q+E"), and using MS Query from Excel certainly seems
to be a smoother experience. However, that does not mean it will not work
with Word or could not work better. However, the general impression is that
Microsoft do not think of Word processing as a "data-oriented" activity so
only tend to provide the most basic facilities for it. A pity, IMO.
Id really like to get MS Query working - not because this particular mail
merge is a show stopper but because I didnt realise MS Query existed and I
just want to see it go.

Yes, MS Query can certainly be useful, but in addition to the limitation you
have already encountered, it is probably worth knowing that over the years
there have been quite a few problems getting it to work with Word, and that
it relies on the old DDE technology which MS keeps claiming we shouldn't
rely on.

Peter Jamieson
 
J

JohnB

Hi Peter. Sorry but I didnt realise you had replied. Thanks for doing so.
Youve explained a lot for me. Cheers, JohnB
 

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