How use two listboxes on a form to sort and filter a report
Posted on 2014-08-01
I have a form that contains two listboxes. They are both multi-select listboxes. One of them is named listSortBy and the other one is named listFilterBy. When I have selected for example two selections in the 1st listbox named listSortBy I want to pass that information on to a report and SORT the results based on the selections in the listbox in the order they were selected. When I have selected for example three selections in the 2st listbox named listFilterBy I want to pass that information on to a report and FILTER the results based on the selections in the listbox.
The report currently uses a query as its recordsource. Do I need to somehow pass the selections from the listboxes on to the query? In other words, sorting and filtering on the report have to be dynamic based on the selections in the two listboxes rather than static which could be determined in the report design.
Complicated, I know. Is this all even possible?