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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Combo box for report parameter???

Status
Not open for further replies.

PQTIII

IS-IT--Management
Sep 21, 2004
110
I want a report to show only the records for certain topics. How do I get the report to allow the user to pick from a drop down list then use that selection to sort the data for only those topics?

Thanks pqt
 
create a form, and then in your query set the criteria to for example [Forms]![frmReports]![txtRep1EndDate] (this references a field called txtRep1EndDate on the form called frmReports.

Hope this helps
 
I have a report called Training by Topic. When this report is picked I want a Form to pop up with a drop down combo box with all topics. Once a topic is picked I want that report show all records with that topic. The drop down list form is Enter Topic. The query in Enter Topic shows all available topics from a table. The query in (report) Training by Topic picks data from two different tables. In what query do I put the criteria statement?
Thanks pqt
 
Create a form. Put a combo box on it (drop-down list Enter Topic). call it cboChosenTopic.

Put a button on the form. follow the wizard to make the button open your report. Then in the form design, view PROPERTIES. click once on the button, and view the code behind the OnCLick event of the button. tweak the Docmd.OPenReport line to include a WHERE statement, something like this:

Docmd.OpenReport "ReportName",acviewpreview,,"TopicID = " & Forms!ReportSelection!cboChosenTopic

This is assuming your new form name is "ReportSelection" and your TopicID is a number.





Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top