ID: Q113314
The information in this article applies to:
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.
This problem may occur in any of the following cases.
The value used for the Compare To field in the Filter Records query contains an invalid character (symbol), such as an apostrophe.
All of the following conditions are true:
-and-
-and-
-and-
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:
Result: SQL parse error message
Result: SQL parse error message
Result: Returns record #2 successfully.
Result: SQL parse error message
The query contains inappropriate characters for field queried. For example, querying a Boolean field for "yes" (the appropriate query would be -1).
If your data source is a Word document is named Where.Doc, you will receive the error message.
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.
Rename your data source document to a name other than Where.Doc.
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.
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