IIF statement in criteria

Schmidtty

Registered User.
Local time
Today, 09:57
Joined
Jan 30, 2003
Messages
12
I have the following statment in the field criteria of a query:

IIF([table1]![fielda] = "All", Is Not Null,[table1]![fielda])

What I am really after is if I have "all" in the field I am trying to match select all possibilities, if it is not "all" select the one I have selected.

the criteria I have above doesn't work. Is there a way???
It seems that if you puy another function in the true clause it doesnt read it. I can put a specific instance in but If I use <> null or is not null it doesn't recognise............
 
In the criteria line and the one below it put this code:

[Forms]![FormName]![ControlName]
[Forms]![FormName]![ControlName] Is Null

Now on your form leave the contol blank and you will see all your records. Put something into the control and the query will be filtered on that data.

hth,
Jack
 

Users who are viewing this thread

Back
Top Bottom