Steve,
The trick is in the query that "feeds" the report. If your report is
currentluy fed (report recordsource, in proper terms) directly from a table,
then make a query that reads the table, and make the report read from the
query.
Assuming you have a form called frmReportParams, with a textbox, list box or
combo box called, say, SelGroup, you would open your query in design view
and set the crirterion under the group field to:
Like Forms![frmReportParam]![SelGroup] & "*"
That way, if a group is selected, then the query, and consequently the
report, will only select records for that group. If no selection is made in
the list/combo, or the text box is empty, then all records will be returned.
Likewise, assuming you have a textbox FromDate and one ToDate, to filter
your report on a date range, you would need a criterion like the following
under a date field:
Between Forms![frmReportParam]![FromDate] And
Forms![frmReportParam]![ToDate]
If you need a multi-select listbox it gets a little more complicated, in
that you would need some code to "read" the selected values and store them
in a temp table in order to filter your query, or more code to do the
filtering in code without the temp table.
I hope these two examples are enough to get you started.
Nikos
Steve said:
I have a report which shows performance figures for
various groups of products. I have seen examples of
reports where the user could run the same report , but
can select from a list box or combo box to run the
report showing only certain groups or select all to show
the full range. Any assistance with this matter and any
other tips on improving my reporting skills would be
greatly appreciated...
Regards
Steve