Microsoft KB Archive/268971

= WD2000: Error Message: Word Could Not Parse Your Query Options =

Article ID: 268971

Article Last Modified on 12/22/2000

-

APPLIES TO


 * Microsoft Word 2000 Standard Edition

-



This article was previously published under Q268971







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 in the following cases:

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 contains 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 &quot;TV-50&quot;, 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 &quot;TV50&quot;, and you use Query Options to filter the field to equal TV50, Word does not display 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 &quot;Compare To&quot; 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: A 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 that is used for the Compare To field in the query is text only or a combination of valid text characters and numbers.

-and-
 * The value that is 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 &quot;Symptoms&quot; 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 that is being queried. For example, querying a Boolean field for &quot;yes&quot; (the appropriate query is -1).

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



Cases 1, 2, and 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 &quot;Where&quot;.



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

Keywords: kbbug kbnofix kbmerge KB268971

-

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

© Microsoft Corporation. All rights reserved.