Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
[email protected] standenman@hotmail.com is offline
external usenet poster
 
Posts: 2
Default Failure to merge

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.

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Failure to merge

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

wrote in message
ups.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.


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
hbear hbear is offline
external usenet poster
 
Posts: 22
Default Failure to merge

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:

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

wrote in message
ups.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.


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
get data failure Curt Mailmerge 1 February 11th 07 08:58 AM
Engine Failure MegBoschetti06 Mailmerge 2 November 10th 06 07:43 AM
Mail Merge Failure Scott Mailmerge 2 January 24th 06 02:11 PM
Failure to print Don K. Microsoft Word Help 5 January 3rd 06 02:43 AM
Smart tag failure Dovid Microsoft Word Help 1 March 17th 05 12:11 PM


All times are GMT +1. The time now is 04:23 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"