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

Conditional Report from ComboBox 1

Status
Not open for further replies.

pleiadeez7

Technical User
May 21, 2009
1
US
First, let me say that I am embarrassed to be writing this post as it points out just how clueless I am! I have a report that produces a contact phone list. The report uses "=UCase([BCP Category])" to group the contacts by category and it works well - if I want to print all categories. Is there a way to use a combobox at the top of the report so that I can choose the BCP Category I want to report on?

Thanks in advance for answering what I'm sure is a rookie question.
 
The combo box should be on the form that calls the report. It will supply the 'Where' statement for the query attached to the report.

eg


Dim strWhere As String

strWhere = Forms![formname]![controlname on form]

DoCmd.OpenReport "ReportNameHere", acViewNormal, , strWhere





Remember amateurs built the ark - professionals built the Titanic

[flush]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top