WD: Word Err Msg: Word Could Not Parse Your Query Options...

ID: Q113314

The information in this article applies to:

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 valid SQL string.

This problem will occur if you do any of the following:

Case 1:

You filter records using Query Options from the Insert Database or Mail Merge dialog box and you query a field in which at least one data record contains a number not immediately preceded by a letter. For example: "TV50" will work, "TV-50" will not.

Case 2:

The query on the field 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 as Where.doc.

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 an apostrophe.

Case 2: Complex Query Contains Combination of Numbers and Letters

All of the following conditions are true:

For example, if you use a data source with the following values

    Data file: 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 will receive unexpected results:

Case 3: Inappropriate Criteria for the Field

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

Case 4: Document Is Named Where.doc

If your data source is a Word document is named Where.Doc, you will receive the error message.

WORKAROUND

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 in the first record begin with a valid character rather than a number.

Case 4

Rename your data source document to a name other than Where.Doc.

STATUS

Microsoft has confirmed this to be a problem in versions of Word listed at the beginning of this article. We are researching this problem and will post new information here as it becomes available.

MORE INFORMATION

The following tables show the valid and invalid characters for query tables.

   Valid Characters
   ----------------
   
   . (period)
   , (comma)
   - (hyphen)

Extended characters beyond ANSI code 128

   Invalid Characters
   ------------------
   
   ~ Tilde                   ! Exclamation
   @ At                      # Pound
   $ Dollar sign             % Percent
   ^ Caret                   & And  Asterisk
   _ Underline               + Plus
   \ Accent Grave            = Equal
   {} Curly braces          [] Square Brackets
   | Pipe                    \ Backslash
   : Colon                   ; Semicolon
   " Double quotation mark   ' Single quotation mark
   < Less than               > Greater than
   ? Question mark           / Forward slash
   () Parentheses

Additional query words: database msquery
Keywords          : kbualink97 kbmerge kbfaq
Version           : 6.0 6.0a 6.0c 7.0 7.0a 97
Platform          : WINDOWS

Last Reviewed: April 9, 1998