PDA

View Full Version : Solved: Filter records from command button



austenr
06-23-2010, 08:41 AM
I have a report that is all subreports. On a form I have a combo box that has three fields; STU, FirstName and LastName. On the form I have a command button as well.

What I am trying to figure out is how to open the sub reports and filter the records for the sub reports based on the conbo box selection. All of the sub reports use the STU as the join. So I was hoping to find a way that when the STU in the combo box is selected, show only those records in each sub report.

The STU is hidden on the combo box so all you see is FirstName and LastName.

Any ideas?

OBP
06-23-2010, 09:24 AM
Ideally you would have all 3 subreports based upon queries.
You can then use the Criteria row of the queries' STU column to enter
forms![formname]![comboname]
where the formname is the name of your form and Comboname is the name of the STU combo.
Alternatively you could use the main Report as a Header and just filter that for the STU and then Master/Child Link the subforms to it.