My form consists of a drop down box (cboCustomer) and a subform. The query behind the subformand looks to the combo box to filter out records based on whichever customer is selected. If no customer is selected then all records should be returned.
Currently it works great with one exception: When no customer is selected, the records that aren't associated with a specific customer (LabelCustomer is Null) aren't being returned.
Does anyone have any idea how to fix this?
Thanks
Bruce
Currently it works great with one exception: When no customer is selected, the records that aren't associated with a specific customer (LabelCustomer is Null) aren't being returned.
Does anyone have any idea how to fix this?
Thanks
Bruce
Code:
SELECT tblLabels.LabelID, tblLabels.LabelNumber, tblLabels.LabelDesc, tblLabels.LabelPlant, tblLabels.LabelCustomer
FROM tblLabels
WHERE (((tblLabels.LabelCustomer) Like IIf(IsNull([forms]![frmNavigationPane]![cboCustomer]),"*",[forms]![frmNavigationPane]![cboCustomer])));