Group:  Microsoft Word ยป microsoft.public.word.mailmerge.fields
Thread: Failure to merge

Geek News

Failure to merge
standenman[ at ]hotmail.com 5/17/2007 3:47:58 PM
I am trying to do a merge mail with the source as an Access database
query. Every time I try I get the following message:

"Word could not merge the main document with the data source because
the data records were empty or no data matched your query options"

Yet if I open up the query there is lots of data.

Re: Failure to merge
"Peter Jamieson" <pjj[ at ]KillmapSpjjnet.demon.co.uk> 5/17/2007 4:45:24 PM
Does your query contain wildcard characters "*" and/or "?" ?

If so, the default connection method used by Word 2002/2003/2007 (OLE DB)
will not see any results in the query, because they /only/ work with the
ANSI SQL wildcards "%" and "_".

If you can create/maintain queries in your database, probably the simplest
workaround is to create a renamed copy of each query you want to use as a
data source, change "*" to "%" and "?" to "_" in the query SQL, and use
those queries instead. Keep the old queries when you're working in Access.

Alternatively you can
a. modify your database so that it recognises the SQL wildcards rather than
the old Jet wildcards. However, in my opinion you would need to test
everything that releid on that database. Also, in Access 2007, there seems
to have been a move back to supporting Jet SQL in favour of ANSI SQL.
b. use DDE instead of OLE DB to retrieve your data. Access must be on your
system to do that. Check Word Tools|Options|general|"Confirm conversions at
open", go through the process of connecting to the data source again, and
select the DDE option in the additional dialog box presented to you.

Peter Jamieson

<standenman[ at ]hotmail.com> wrote in message
news:1179416878.544487.50740[ at ]y80g2000hsf.googlegroups.com...
[Quoted Text]
>I am trying to do a merge mail with the source as an Access database
> query. Every time I try I get the following message:
>
> "Word could not merge the main document with the data source because
> the data records were empty or no data matched your query options"
>
> Yet if I open up the query there is lots of data.
>

Re: Failure to merge
hbear 5/21/2007 8:20:01 PM
Thank you, thank you, thank you!
This same problem has been driving me nuts for two days. It's great to know
exactly what's causing it, and the DDE workaround has resolved it perfectly.

Thanks again!

hbear

"Peter Jamieson" wrote:

[Quoted Text]
> Does your query contain wildcard characters "*" and/or "?" ?
>
> If so, the default connection method used by Word 2002/2003/2007 (OLE DB)
> will not see any results in the query, because they /only/ work with the
> ANSI SQL wildcards "%" and "_".
>
> If you can create/maintain queries in your database, probably the simplest
> workaround is to create a renamed copy of each query you want to use as a
> data source, change "*" to "%" and "?" to "_" in the query SQL, and use
> those queries instead. Keep the old queries when you're working in Access.
>
> Alternatively you can
> a. modify your database so that it recognises the SQL wildcards rather than
> the old Jet wildcards. However, in my opinion you would need to test
> everything that releid on that database. Also, in Access 2007, there seems
> to have been a move back to supporting Jet SQL in favour of ANSI SQL.
> b. use DDE instead of OLE DB to retrieve your data. Access must be on your
> system to do that. Check Word Tools|Options|general|"Confirm conversions at
> open", go through the process of connecting to the data source again, and
> select the DDE option in the additional dialog box presented to you.
>
> Peter Jamieson
>
> <standenman[ at ]hotmail.com> wrote in message
> news:1179416878.544487.50740[ at ]y80g2000hsf.googlegroups.com...
> >I am trying to do a merge mail with the source as an Access database
> > query. Every time I try I get the following message:
> >
> > "Word could not merge the main document with the data source because
> > the data records were empty or no data matched your query options"
> >
> > Yet if I open up the query there is lots of data.
> >
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net