I have a subform that has an option group.
MainFormName: frmMainTab
SubformName : frmreports
Option Group (on frmreports) fraWhichReport
ReportName: rptMonthlyStats
fraWhichReport options
Opt 1 Person summary only report
Opt 2 Person summary and detail report
Opt 3 All People summary only report
Opt 4 All people summary and detail report
I would like to have one (maybe 2) report(s) that will show or hide the detail section based on the option button selected.
Not sure what is the best way to accomplish this and/or the vba code.
I added the following code to the details band in the report
But error condition says it can't find the subform.
My question(s) are:
1. can I pass the selected radio button as criteria (if so how?)
2. Is there a better way to do this?
Thanks
Lhuffst
MainFormName: frmMainTab
SubformName : frmreports
Option Group (on frmreports) fraWhichReport
ReportName: rptMonthlyStats
fraWhichReport options
Opt 1 Person summary only report
Opt 2 Person summary and detail report
Opt 3 All People summary only report
Opt 4 All people summary and detail report
I would like to have one (maybe 2) report(s) that will show or hide the detail section based on the option button selected.
Not sure what is the best way to accomplish this and/or the vba code.
I added the following code to the details band in the report
Code:
If Forms![frmMainTab].Form![frmReports]!frawhichReport.Value = 1 Then
[indent]rptMonthlyStats.details.visible = False)][/indent]
My question(s) are:
1. can I pass the selected radio button as criteria (if so how?)
2. Is there a better way to do this?
Thanks
Lhuffst