specify data

C

Chris

I have queries which contain all of the information on our
companies clients. I then have a number of reports which
use this information for us to see.

However, each client is categorised by which county they
live in.

When clicking on a report how do I get a box to be
displayed which selects which county they are from, and
then filter the results accordingly.

eg: a box is displayed which has a combo box. From that
box I select Oxfordshire. The report then only shows those
clients that live in Oxfordshire.
 
J

Jeff Boyce

Chris

One approach would be to create a new form. On that form, add a combobox
that lists counties, and a command button that includes code in the Click
event, something like (actual syntax may vary):

DoCmd.OpenReport "YourReportName",acPrintPreview,,"[County]=" &
Me!YourFormName!cboYourComboBoxName

Check the syntax on the .OpenReport to be certain, but the basic concept is
opening the report with a "WHERE" clause, limiting to county = what's
selected in the combobox.
 
Top