[SOLVED - sort of] IIf and Is Not Null not working
I have a combo box on my form that will filter my query criteria. In my combo box, I have the selection "<All>" to allow all data to show. I put this statement in the Query criteria box:
IIf([Forms]![frm_JobList]![cbo_Category]="<All>",Is Not Null,[Forms]![frm_JobList]![cbo_Category])
If I select <All> from the combo box, the query returns no data.
If I select an alternative selection (that is in the table) then the query returns the data.
The error is obviously in the "True" part (Is Not Null). But when I use Is Not Null by itself, I get all the data.
Any thoughts as to what I am doing wrong?
I have a combo box on my form that will filter my query criteria. In my combo box, I have the selection "<All>" to allow all data to show. I put this statement in the Query criteria box:
IIf([Forms]![frm_JobList]![cbo_Category]="<All>",Is Not Null,[Forms]![frm_JobList]![cbo_Category])
If I select <All> from the combo box, the query returns no data.
If I select an alternative selection (that is in the table) then the query returns the data.
The error is obviously in the "True" part (Is Not Null). But when I use Is Not Null by itself, I get all the data.
Any thoughts as to what I am doing wrong?
Last edited: