Hi folks,
I’ve inherited (groan!) a database from an employee that has just left our company and am struggling to get the filters to work.
It has a simple form, with displayed data on the right and two (soon to be more) combo boxes on the left. The combo boxes allow users to select citeria to filter by (specifically username and company).
Rather than have the combo boxes filter on their “after update” events, I would like a user to be able to select the criteria from the two boxes and then click an “Apply Filter” button which runs the filter based on the selections made.
I can easily do it for one combo box criteria using the “on click” button event to run the code DoCmd.ApplyFilter , “[Auto_ID] = Me!Combo25.Value”.
My question is, therefore, how can I stack up these filters,so that the filter runs on the values of two (or more) combo boxes? I guess its an SQL thing?
Also, I would like the multiple filter to accept values where a combo box hasn’t be used – i.e. user may want to specify filter criteria in CB’s 1, 3 and 4, but leaves 2 and 5 untouched??
Finally! How can I stop the whole form going blank when the filter doesn’t find any values?
Phew!
Thanks in advance,
Ade