Combo box to control report

vavs

Well-known Member
Joined
Jul 2, 2004
Messages
516
I have a report that is being generated by many different users. They are looking up inventory based on multiple criteria. I have set up a series of combo boxes on a form and want to use them as the filter criteria for the report. I have the report based on a query and I put the combo box reference in the criteria field of the query design. My problem is that sometimes people will want to filter on all the criteria and other times only one or two criteria. I tried to use an iif statement in the criteria like :

IIf(([Forms]![frmFilter]![cmbGrade])="","like *",[Forms]![frmFilter]![cmbGrade]")

but I get no results when the field is blank. When I have something selected in the form everything works well.

My question is how do I filter for only non null selections from a series of combo boxes on a form?
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,224,602
Messages
6,179,843
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top