Microsoft Knowledge Base |
|
"Error in Expression..." Adding Criteria Value with Bracket |
|
|
Last reviewed: September 12, 1996
Article ID: Q119098 |
|
The information in this article applies to:
SYMPTOMSIn Microsoft Query, when you add criteria to a query for a field, and the criteria value contains the bracket characters ([]), you receive the following error message:
Error in expression: value Invalid Column name: 'value'If the criteria value contains a single left bracket character ([), you receive the following error message:
Missing ')', ']', or '|' CAUSEThis error message appears when you use the Add Criteria or Edit Criteria dialog box to add the criteria, and you do not enclose the value that contains the bracket character(s) in single quotation marks. The error message appears because the bracket characters are reserved characters, and are used when you compare the value of a field in one table to the value of a field in another table. For example, the following value
[CUSTOMER].[CUSTMR_ID]refers to the CUSTMR_ID field in the CUSTOMER table. Note that if you enter a value in the Value box of the Criteria pane, and the value contains a bracket character, the single quotation marks are automatically added, and no error message appears. You do not receive an error message if you use a value that contains a single right bracket character.
WORKAROUNDTo avoid receiving an error message when you enter a value that contains a bracket character in the Add Criteria or the Edit Criteria dialog box, enclose the value in single quotation marks, as in the following examples:
'[Jill' '[Brian]' STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
REFERENCESFor more information about the Add Criteria Command (Criteria Menu), choose the Search button in Help and type:
criteria: adding |
|
KBCategory: kbtool
©1997 Microsoft Corporation. All rights reserved. Legal Notices. |