Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter report with 2 variables

Status
Not open for further replies.

NRK

Technical User
Feb 13, 2002
116
US
I am trying to create a filter that will allow users to, first, select a Category and, second, select multiple records that are associated with said Category.

To do this, I have created a pop-up form that has a combo box (holds Category values) and a listbox (holds Case records). The process that I am trying to create would work as follows:

1. User selects Print command on data entry form
2. This opens report that lists all Categories and all Case records.
3. And it opens a pop-up form - at this point, the user can close the form if they wish to print all records or filter the records using the pop-up form.
4. If they wish to filter - select Category in combobox, on AfterUpdate of Combobox, the listbox that holds the records is updated. The user can then print the report with all records associated with Category (by clicking "Set Filter" command button) or further filter report.
5. If they wish to filter again - select one or more Case records within Category via the multiselect Listbox. Then, the user clicks "Set Filter" command button and the report should find what is needed.

So far, I have created the pop-up form. The report opens with all Categories and Case records. Unfortunately, I get a "Enter Parameter Values" message that is associated with the listbox (which holds the Case record values).

For the Category combobox, I am using the following as the RowSource:
SELECT DISTINCT [qry_ST001].[tcCategory] FROM qry_ST001;

For the Case records listbox, I am using the following as the RowSource:
SELECT [qry_ST001].[tcID] FROM qry_ST001 WHERE frm_FilterReport.filter1=[qry_ST001].[tcCategory];

Hopefully, this gives you a good idea of my situation and what I need. I would appreciate any advice that you can provide and would happily give any additional information that you need.

Thanks!


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top