Filter report

  • Thread starter Thread starter jonathan brown
  • Start date Start date
J

jonathan brown

I have a report that displays a list of Sites and
associated information for each site. I want to add a
drop down list box to the report that lists all of the
sites. What I want the list box to do is filter the
report based on the site I select in the drop down list
box. I'd like to include a "null" option in the list box
too in the case that I want to show all sites in the
report.

Also, I'd want to ensure that the listbox doesn't print
when I print the report.
 
Jonathan,
You can't place a working list box on a report. You'll need to create a
"dialog" form that allows the user to select a Location to report on.
Place these controls on the form (ex. frmMyDialog, listbox [lstLocation],
and a button [cmdPrintMyReport]). Populate the listbox with all your
locations. Setup the cmdPrintMyReport to open the report
In the query behind your report, set up a criteria for your Location
field like this...
Like Forms!frmMyDialog!lstLocation & "*"

When you select a location, like Boston, and hit the button, the report
will print only the Boston records. If you select a Null from the listbox,
the report will print all locations.

hth
Al Camp
 
Not sure what you want since "add a drop down list box to the report" isn't
possible. You can place a combo box on a report but it has no drop-down. Can
you try again?
 
Back
Top