By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,425 Members | 2,549 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,425 IT Pros & Developers. It's quick & easy.

Subreport Control Reference

P: 18
There is a report with 2 unbound sub-reports. I'd like to filter each sub report for a specified date range (the same range for each). If I put the criteria in design of each sub report it filters for the dates entered but asks for each date twice (once for each report). I'm struggling with the coding to reference the fields on each sub report. I was hoping to have a cmdButton on the main form that opens this report and passes the start and ending dates entered once to each subreport.

I found this coding, but it doesn't seem to work:

Expand|Select|Wrap|Line Numbers
  1. Reports![MasterReportName]![SubReportName].Report![Field] Between [Enter Start Date:] AND [Enter End Date:]
  2.  
Dec 16 '16 #1
Share this Question
Share on Google+
1 Reply


PhilOfWalton
Expert 100+
P: 1,430
I suspect your approach should be to have the start & end dates on your form and have the sub report's underlying query have criteria referring to the dates on the form

Something like Between Forms!MyForm!StartDate and Forms!MyFormEndDate

http://www.knowledgewave.com/blog/ms...e-range-2.html gives a simple set of instruction.

Phil
Dec 20 '16 #2

Post your reply

Sign in to post your reply or Sign up for a free account.