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!

Report based on a query for Office, one or all

Status
Not open for further replies.

peciam

Programmer
Aug 3, 2006
44
US
Hi,

I have 10 reports that are based on a different queries. When that report is selected I want the user to be able to select one office and get the results or all offices and get the results. I have an input in my query, but now I want to have one form that has a list box of the office choices. I want to use the one form for all the different reports and queries. Any one have an simple example that there willing to share?

Thanks,

TC
 
You can use the Where argument of OpenReport, for example:

Code:
If Me.cboOfficeID <> "" Then
    DoCmd.OpenReport "rptReportA", , , "OfficeID=" & Me.OfficeID
Else
    DoCmd.OpenReport "rptReportA"
End If
 
Hi,

Thanks for the response. I want to use a form with the list of offices, and I want to use the same form for all 10 reports.
 
Hi,

I can seem to get the form to pop up from my query. It lists the parameter box, not the form.

TC
 
Do things the other way round. Create a form and add a combo for offices and a combo for reports, then add a button to run the report selected in the report combo for the office selected in the office combo. A lot of this can be done with wizards.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top