G
Guest
I am constructing the criteria for my query from a drop down on a form. The problem I am having is the sometimes I do not want to filter on a given value from the drop down, but return all of the values instead. Therefore I have added the value "All" to the drop down. In the criteria for the query I have used
IIf([Forms]![frmInputs]![Location]="All",([tabValues].[Location]) Is Not Null,[Forms]![frmInputs]![Location]
The problem that I am having is that the query is returning no records when I have chosen "All" from the drop down. If I just use Is Not Null in the criteria I get over 4,000 records. Is there a reason that Is Not Null does not work inside of the IIf statement? Is there another way of doing this? Any help would be great
Thanks
Melissa
IIf([Forms]![frmInputs]![Location]="All",([tabValues].[Location]) Is Not Null,[Forms]![frmInputs]![Location]
The problem that I am having is that the query is returning no records when I have chosen "All" from the drop down. If I just use Is Not Null in the criteria I get over 4,000 records. Is there a reason that Is Not Null does not work inside of the IIf statement? Is there another way of doing this? Any help would be great
Thanks
Melissa