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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

subreport filter using multiselect listbox

Status
Not open for further replies.

birdlady77

Technical User
Sep 28, 2005
1
US
Apparently I've stumped the chumps at another Access forum, so I'm trying here to see what you think. I apologize for asking the same question again, but I haven't gotten an answer I understand, so I thought I would try one more time. I'm sure the real problem is in how I am trying to explain what I am doing. But here it goes:

There is a form
On this form there is a multiselect listbox, a hidden "capture" box, and a command button.
First, you select a year or several years.
Then you click the command button, and a report opens (print preview)
The main report consists of two subreports.
You should see only the details listed for the years you selected for each of the subreports.

However, you see all the years that are in the database.

FYI - the main report that contains the two subreports is not linked to the subreports. The main report was designed in a similar fashion to this: a main form can act like a placemat to display subform data (where the main form was not based on any tables or queries).

What is going wrong? I can use code to filter the subforms, but why won't my filter work with my subreports?

Thanks,
Piper
 
There is a generic multi-select list box function at which should meet your needs.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Actually I have the code and information at faq701-6099

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top