Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
get data failure | Mailmerge | |||
Engine Failure | Mailmerge | |||
Mail Merge Failure | Mailmerge | |||
Failure to print | Microsoft Word Help | |||
Smart tag failure | Microsoft Word Help |