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(condition1,condition2)
NOTE: Do not type a line similar to the following:
(condition1#AND#condition2)
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")