Microsoft KB Archive/136322

= Works: Grouping Filter Conditions in a Works Database =

Article ID: 136322

Article Last Modified on 1/19/2007

-

APPLIES TO


 * Microsoft Works 6.0
 * Microsoft Works 2000 Standard Edition
 * Microsoft Works 4.5 Standard Edition
 * Microsoft Works 4.0 Standard Edition

-



This article was previously published under Q136322



SYMPTOMS
When you attempt to use parentheses to group conditions together in an Easy Filter or filter-using formula in Microsoft Works 4.0 or later, the parentheses are deleted or treated as text when you exit the Filter dialog, and you receive the following error message:

The filter contains an error. Review the filter and makes changes if necessary, and then try again.



RESOLUTION
To resolve this issue, enclose the conditions that you want to evaluate first within AND or OR functions.

For example, to group two conditions together with a logical AND within a Filter formula, type a line similar to the following:

AND

NOTE: Do not type a line similar to the following:

( #AND# )

Example Filter Formula
When you type the following filter formula

=LastName="Smith"#and#(FirstName="Margaret"#or#FirstName="Larry")

Works changes the formula to the following

='LastName'="Smith"#AND#'FirstName'="Margaret"#OR#'FirstName'="Larry")"

and you receive the error message described in the "Symptoms" section of this article.

To group the two FirstName conditions together correctly, use the OR function. To do this, change the filter formula to match the following line:

=LastName="Smith"#AND#OR(FirstName="Margaret",FirstName="Larry")

Additional query words: 4.00 4.00a 4.50 4.50a w_works works2k works6 query errmsg

Keywords: kberrmsg kbprb kbui KB136322

-

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

© Microsoft Corporation. All rights reserved.