Hello,
I'm trying to create a Query to filter using input from form frmSearch which contain Combo boxes of fields. These row source of these cbo is tblReports. I am trying out conditional filter using following expression in criteria:
I also used:
What I want to achieve is query should filter the contents based on ReportNo from frmSearch and if that cbo in frmSearch is empty or not selected, it should use like "*" criteria and show all contents.
Where I'm doing wrong. Please help.
Best Regards
I'm trying to create a Query to filter using input from form frmSearch which contain Combo boxes of fields. These row source of these cbo is tblReports. I am trying out conditional filter using following expression in criteria:
=IIf(IsNull([Forms]![frmSearch]![ReportNo]), Like "*", [Forms]![frmSearch]![ReportNo])
I also used:
=IIf([Forms]![frmSearch]![ReportNo].[ListIndex]=-1), Like "*", [Forms]![frmSearch]![ReportNo])
What I want to achieve is query should filter the contents based on ReportNo from frmSearch and if that cbo in frmSearch is empty or not selected, it should use like "*" criteria and show all contents.
Where I'm doing wrong. Please help.
Best Regards
Last edited: