Unable to filter and sort records in mail merge operations when MS Query is used to connect to data source (286848)



The information in this article applies to:

  • Microsoft Office Word 2003
  • Microsoft Word 2002

This article was previously published under Q286848

SYMPTOMS

When you use Microsoft Query to connect to your data source in a Mail Merge operation, the sort and filter functions in the Mail Merge Recipients dialog box do not work.

CAUSE

Microsoft Word cannot parse the SQL string sent by Microsoft Query, and the sorting and filtering operations fail without producing an error message.

WORKAROUND

Use the filter and sort functions of Microsoft Query. To access the Microsoft Query functions, follow these steps:
  1. In the Mail Merge Recipients dialog box, click the arrow to the left of any column heading, and then click (Advanced...).

    Microsoft Query starts. In Microsoft Query, you can sort the records, filter the data, or remove any filter criteria.
  2. Do one of the following:
    • To sort the data by a particular column, click any data in that column, and then click either Sort Ascending or Sort Descending on the Microsoft Query toolbar.
    • To filter the data, click Show/Hide Criteria on the Microsoft Query toolbar.

      The query criteria grid is now visible. Drag the fields that you want to use in your query to separate columns in the query criteria grid and type the criteria values for each field. Notice that only the filtered records are displayed.
    • To remove any filter criteria, on the Criteria menu, click Remove All Criteria.
  3. On the File menu, click Return Data to Microsoft Word when you are finished sorting or filtering the data.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Modification Type:MajorLast Reviewed:9/25/2006
Keywords:kbbug kbmerge kbpending KB286848