Hi Richard,
As long as you're using Access 2000 you won't be able to use
parameter queries, as a mail merge DDE connection is
version-specific. You'd have to have the data in Access
2003.
The only solution I see, given this combination, would be to
build the query interface into Word: Have Word display an
Inputbox or UserForm to get the criteria, then either
- change the QueryDef using DAO before attaching the data
source
- apply the criteria to the data that's been linked into
Word by setting the QueryString property
> I've recently upgraded(?) to Word 2003 from 2000 and want
> to mailmerge from parameterised queries in an Access 2000
[quoted text clipped - 6 lines]
> Query route, but that doesn't seem to allow parameters
> either!
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:-)
Richard - 19 Jan 2004 21:37 GMT
Thanks Cindy
It might be simpler to revert to Word 2000, although
somehow that goes against the grain! Guess I'll just
have to get to grips with VBA for Word - the Access end
is no problem. Which of your routes is the easier do you
think?
Cheers
richard
>-----Original Message-----
>Hi Richard,
[quoted text clipped - 34 lines]
>
>.
Cindy M -WordMVP- - 20 Jan 2004 18:03 GMT
Hi Richard,
> It might be simpler to revert to Word 2000
Why not upgrade to Access 2003?
> Guess I'll just
> have to get to grips with VBA for Word - the Access end
> is no problem. Which of your routes is the easier do you
> think?
Oh, I'd definitely say change the QueryDef. Word's
QueryString is limited to a max of 255 characters, which
can definitely cause problems! And since you're comfortable
with Access VBA that will make your learning curve much
flatter :-) You really won't need to learn much, except
1. that the procedure in which you put the code should be
named AutoOpen and be stored in the document (or the common
template if the users will be creating multiple new docs).
2. the OpenDataSource code to link to the database after
you've changed the QueryDef. This you should be able to
record in a macro.
The procedure can display message boxes to get the
"parameter" information. Then just plug that into the
DAO-code as you would if you were coding in Access.
Remember to set a Reference (Tools/References) to the DAO
object library!
(Note that you may find you need to hook up to the linked
tables directly, rather than through the backend)
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Sep 30 2003)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:-)