Microsoft KB Archive/113314

= WD: Error Message: "Word Could Not Parse Your Query Options" =

Article ID: 113314

Article Last Modified on 1/18/2007

-

APPLIES TO


 * Microsoft Word 6.0 Standard Edition
 * Microsoft Word 6.0a
 * Microsoft Word 6.0c
 * Microsoft Word 95 Standard Edition
 * Microsoft Word 95a
 * Microsoft Word 97 Standard Edition

-



This article was previously published under Q113314





SYMPTOMS
When you attempt to work with a mail merge data source, you may receive the following error message:

Word could not parse your query options into a valid SQL string.

This problem occurs when any of the following cases is true:

Case 1
You filter records by using Query Options in the Database dialog box (on the View menu, point to Toolbars, click Database, and then click Insert Database) or the Mail Merge dialog box (on the Tools menu, click Mail Merge), and your query criteria contain a field in which at least one data record contains a number that is not immediately preceded by a letter (for example, a hyphen).

For example, if your data source contains a field with the value "TV-50" and you use Query Options to filter the field to equal TV-50, Word displays the error message. However, if your data source contains a field with the value "TV50", and you use Query Options to filter the field to equal TV50, Word does not send an error message.

Case 2
The query on the field that is described in case 1 contains at least one letter, at any position.

Case 3
The query contains text, but the SQL field is formatted as a Boolean field.

Case 4
Your data source is a Word document named Where.doc, or the header row contains a field name of Where.



CAUSE
This problem may occur in any of the following cases:

Case 1: Invalid Character in Compare To Field
The value used for the Compare To field in the Filter Records query contains an invalid character (symbol), such as a hyphen.

Case 2: Complex Query Contains Combination of Numbers and Letters
All of the following conditions are true:
 * The first record in the Word document data source contains a field that begins with a number.

-and-
 * The field is used as part of the query definition.

-and-
 * The value used for the Compare To field in the query is text only or a combination of valid text characters and numbers.

-and-
 * The value used for the Compare To field in the query is not a combination of valid symbols and numbers.

For example, if you use a data source with the following values   ID   Name      Address    City        State    Zip -

1J  John      1 2nd St   Seattle     WA       98109 1S  Steve     2 1st St   Bellevue    WA       98004-0001 1M  Mary      One M St   Everett     WA       Unknown you receive the error message listed in the "Symptoms" section of this article when your query criteria is similar to any of the following:
 * Address Equal To One M St

-or-
 * ID Equal To 1M

-or-
 * Zip Equal To 98004 0001

NOTE: The Zip Code is missing the hyphen.

-or-
 * Zip Equal To Unknown

Case 3: Inappropriate Criteria for the Field
The query contains inappropriate characters for the field queried. For example, querying a Boolean field for "yes" (the appropriate query would be -1).

Case 4: Data Source Header Field Name or Document File Name Contains the Word "Where"
If your data source header row or document file name contains the word "Where", you receive the error message listed in the "Symptoms" section of this article.



Cases 1-3
To work around this problem, use only valid characters in the Word document data source, and create the data source so that all fields begin with a valid character rather than a number.

Case 4
Rename your field header name or your data source document file name to remove the word "Where".



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Additional query words: database msquery

Keywords: kbbug kbfaq kbmerge kbnofix kbualink97 KB113314

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.