You're right, Peter, I have a user-defined function in my query.
I tried using a DDE connection, but I wasn't able to get it to work.
Instead, I got messages saying it couldn't make the connection. One
alternative is to run a make-table query that creates a temporary table from
the single record to mail merge. I'll probably do something like that.
Thanks for your help with this.
Paul
> I tried using a DDE connection, but I wasn't able to get it to work.
> Instead, I got messages saying it couldn't make the connection.
When you try to make a DDE connection, if the database is not already open,
you can get problems because DDE starts Access, Access tries to open the
database, and may display one or more dialog boxes (e.g. the security dialog
box). They may not be displayed in front of the Word document, so you do not
know that you have to respond to something. Then they time out, and the DDE
connection fails. So it may be worth using Alt-tab to cycle through the
various Windows.
AFAIK with queries that contain UDFs, you either have to get DDE to work,
one way or another, or find a workaround that avoids the UDF. Only the
Access programme "understands" UDFs - no other method of getting at the
Access data really knows what they are.

Signature
Peter Jamieson
http://tips.pjmsn.me.uk
> You're right, Peter, I have a user-defined function in my query.
>
[quoted text clipped - 37 lines]
>>>
>>> Paul
James - 23 Feb 2008 00:43 GMT
I'm actually opening the Word document from VBA in the Access database, so
it's already open. It's actually easy to run a Make Table query in Access,
so I'm going to try that to bypass the problem with the UDF.
Thanks, Peter
>> I tried using a DDE connection, but I wasn't able to get it to work.
>> Instead, I got messages saying it couldn't make the connection.
[quoted text clipped - 53 lines]
>>>>
>>>> Paul