Hi

I've got a query which is populating a 4 column combobox on a form from a main table. I now need to add a checkbox to restrict the records being brough back. If this is checked then one of the record fields (Account) in the main table needs to be used to lookup the account status in another table indexed by the account number and only bring back the records with the accounts that have a particular status ('remediated').

Tables:
Consolidation - has field 'Account' (linked with a 1-many relation to the table below)
WS_Account - primary key is 'Account', another field is 'Status'.

The form (BulkAmend) has a checkbox (Remediated).

I'm using this expression to try and filter the records brought back by other elements of the query (which work fine)

Remediated:
IIf ( Forms![BulkAmend]![Remediated] =0, True , IIf ([WS_Account]![Status] = "Remediated", True , False ) )

but am getting a syntax error "The expression you entered has an invalid dot or ! operator or invalid parenthesis. Since I created the expression using the Expression Builder I'm surprised and wonder if it's something else.

First, am I doing it the right way? Second, why am I geting the syntax error?

Any help much appreciated!


Cheers
JC