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

Report with sub-reports; how can I select report by surname? 1

Status
Not open for further replies.

wezguy

Instructor
Apr 28, 2004
3
GB
I have a report with 4 sub reports inside. When I put "Like "Surname" in the query criteria I get 5 requests for the surname when I run the report. How can I reduce this to one? Thanks.
 
Not sure if this is the entire problem, but the proper format for the criteria in the query column would be...
Like [enter Surname]


Tom
 
Your issue is that you are using parameter/prompt queries. Consider referencing a text or combo box on a form. You could create a combo box of all Surnames from your table and use this as the criteria:
Forms!frmNewForm!cboSurNames

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Ok thanks very much for this,I will try out the combo box of all surnames. Thanks for the piece of code, I think I probably set it up wrong initially as well as I have the report looking at a query for the data and not a form? I use a form which comes from the same query to input the data but view it through the report for printing etc. Should I link the report to the form, or to the query that the form (and the report) is based on do you know?

Thanks
 
For the subreports, the criteria for their record source queries almost have to come from a control on a form.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top