Microsoft Knowledge Base Email Alertz

KBAlertz.com: (301595) - When you try to merge data from a Microsoft Access query with Microsoft Word, Microsoft Word displays one of the following error messages: Word could not merge the main document with the data source because the data records were empty or no data...

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]





ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **


Bug Tracking Software
For bug tracking software or defect tracking software or issue tracking software, visit Axosoft.


Community Site



We Send hundreds of thousands of emails using ASP.NET Email



Expert Web Design & Graphic Design
Design44.com

ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **




Mentioned In








Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks




Article ID: 301595 - Last Review: March 29, 2007 - Revision: 5.1

No records are displayed when you merge data with Microsoft Word

This article was previously published under Q301595
Moderate: Requires basic macro, coding, and interoperability skills.

This article applies only to a Microsoft Access database (.mdb).

On This Page

SYMPTOMS

When you try to merge data from a Microsoft Access query with Microsoft Word, Microsoft Word displays one of the following error messages:
Word could not merge the main document with the data source because the data records were empty or no data records matched your query options.
-or-
No recipients match the filter criteria you specified. Check the recipient list to make sure it is not empty or change your filter criteria to include more recipients.
However, when you run the query in Microsoft Access, the correct records are displayed.

CAUSE

By default, Word is configured to use the Jet.OLEDB provider to retrieve records from an Access database. If the Access query contains the wild card characters "*" or "?" in the criteria, the wild card characters will be ignored by the Jet.OLEDB provider and no matching records will be returned. The Jet.OLEDB provider is based on ANSI 92 syntax, which supports the wild card characters "%" and "_", not the wild card characters "*" and "?".

For example, Like "B*" will not work correctly, but Like "B%" will work correctly.

RESOLUTION

You can use the following options to allow Word to retrieve the correct records.
  • Change the criteria from "*" to "%" or from "?" to "_".

    Note If the query is being used by Access, make a copy of the query, change to "%" or "_" in the copy, and then use this copy for merging with Word.
  • Modify the database to use ANSI 92 syntax. In Microsoft Office Access 2003 or earlier versions of Access, do this by clicking Options on the Tools menu. Then, click the Tables/Queries tab. On this tab, click to select the SQL Server Compatible Syntax (ANSI 92) check box, and then modify all queries to use "%" instead of "*" or "_" instead of "?".

    In Microsoft Office Access 2007, click the Microsoft Office Button, click the Object Designers tab, click to selct the This database check box under SQL Server Compatible Syntax (ANSI 92), and then modify all queries to use "%" instead of "*" or "_" instead of "?".

MORE INFORMATION

Steps to Reproduce the Behavior

  1. In Access 2003 or in an earlier version of Access, open the sample database Northwind.mdb.
  2. Create a new query that is based on the Customers table.
  3. In the Criteria row, under the Company Name field, add Like "A*".
  4. Save and then close the query.
  5. In the Database window, click the query that you just created.
  6. On the Tools menu, point to Office Links, and then click Merge It with Microsoft Word.
  7. On the first page of the Microsoft Word Mail Merge Wizard, click Create a new document and then link the data to it, and then click OK. Note that Microsoft Word opens.
  8. On the Mail Merge toolbar, click Insert Merge Fields. Select the field or fields to insert into the mail merge document, and then click Close.
  9. On the Mail Merge toolbar, click Merge to New Document, and then click OK. Note that you receive the error message that is mentioned in the "Symptoms" section of this article.
NOTE: If you use the Microsoft Word Mail Merge Wizard to complete the mail merge (using the query created above) you also receive an error. The error received is as follows:
No recipients match the filter criteria you specified. Check the recipient list to make sure it is not empty or change your filter criteria to include more recipients.

REFERENCES

For additional information about other Mail Merge questions, click the following article number to view the article in the Microsoft Knowledge Base:
290408  (http://kbalertz.com/Feedback.aspx?kbNumber=290408/ ) WD2002: Frequently Asked Questions About Mail Merge

APPLIES TO
  • Microsoft Office Access 2007
  • Microsoft Office Access 2003
  • Microsoft Access 2002 Standard Edition
  • Microsoft Word 2002
Keywords: 
kbimport kberrmsg kbmerge kbprb KB301595
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Anonymous User - Jimelep NOSPAM-AT-NOSPAM direcway.com Report As Irrelevant  
Written: 9/2/2004 5:52 PM
When I try to mail merge documents, I get the following message at Step 3: "The operation cannot be completed because of dialog or database engine failures. Please try again later." Can anyone help with this? Thanks in advance

(Optional) Name

(Optional) Public URL Or Email

Comments
No HTML -- Text Only Please