Please help!
I've been struggling with this for an eternity! I have a query that gets its search criteria from a combo box on a form. I'm trying to make it so that if the user selects an item in the combo box, the query returns results based on that item. But, if they leave the combo box empty, all records are returned. The query works if I select an item, but if I don't, I get zero records returned. This is what I have in the criteria field.
IIf(IsNull([Forms]![formname]![Combo]),"*",[Forms]![formname]![Combo])
I've tried all kinds of variations of the wildcard using the words Null, like, etc. and all I get is zero records returned.
I've been struggling with this for an eternity! I have a query that gets its search criteria from a combo box on a form. I'm trying to make it so that if the user selects an item in the combo box, the query returns results based on that item. But, if they leave the combo box empty, all records are returned. The query works if I select an item, but if I don't, I get zero records returned. This is what I have in the criteria field.
IIf(IsNull([Forms]![formname]![Combo]),"*",[Forms]![formname]![Combo])
I've tried all kinds of variations of the wildcard using the words Null, like, etc. and all I get is zero records returned.