Hi
I have a report containing two subreports (all unbound).
I would like to open the report and specify different criteria for each of the subreports.
For example the 1st subreport contains data pertaining to an "Event Date" that the user selects off a drop down on a form - the second subreport shows data pertaining to a range of dates ie between a "Start Date" and an "End Date" also selected by the user on the form.
I can get both subreports to work individually with the selected criteria - but how do I get the main report to display with the required subreports?
My seperate subreport code (so far)...
1.
stDocName = "Subreport - Momentum Maturities - By EVENT DT"
stLinkCriteria = "[Event Date]=" & Me![Combo3]
DoCmd.OpenReport stDocName, acViewPreview, ,stLinkCriteria
...
AND ...
2.
stDocName = "Subreport - Momentum Maturities - YTD by MONTH"
stLinkCriteria = "[Event Date] Between " & Me![Combo5] & " and " & Me![Combo7]
DoCmd.OpenReport stDocName, acViewPreview, , stLinkCriteria
Any ideas please???
Thanks alot
I have a report containing two subreports (all unbound).
I would like to open the report and specify different criteria for each of the subreports.
For example the 1st subreport contains data pertaining to an "Event Date" that the user selects off a drop down on a form - the second subreport shows data pertaining to a range of dates ie between a "Start Date" and an "End Date" also selected by the user on the form.
I can get both subreports to work individually with the selected criteria - but how do I get the main report to display with the required subreports?
My seperate subreport code (so far)...
1.
stDocName = "Subreport - Momentum Maturities - By EVENT DT"
stLinkCriteria = "[Event Date]=" & Me![Combo3]
DoCmd.OpenReport stDocName, acViewPreview, ,stLinkCriteria
...
AND ...
2.
stDocName = "Subreport - Momentum Maturities - YTD by MONTH"
stLinkCriteria = "[Event Date] Between " & Me![Combo5] & " and " & Me![Combo7]
DoCmd.OpenReport stDocName, acViewPreview, , stLinkCriteria
Any ideas please???
Thanks alot