huston8481
asked on
Dynamic subreport group level control source
Using Microsoft Access 2000
Is it possible to dynamically set the Group Level Control source of a subreport?
Essentially,
Given two reports where rptSubMain is a subreport of rptMain
rptMain
rptSubMain
Is it possible, based on outside parameters from a form or the main report, to dynamically set the group level of rptSubMain?
So, in rptMain
Me.rptSubMain.Report.Group Level(0).C ontrolSour ce = ""
This statement gives an error message 2455 saying the expression has an invalid reference.
I've tried everything but always end up with errors saying that I cannot change the property while printing, or the report is not open or non-existent.
I'm not looking for sorting or filtering here, I need it to actually Group because the subreport is doing totals and averages based on a different query than the main report.
Is it possible to dynamically set the Group Level Control source of a subreport?
Essentially,
Given two reports where rptSubMain is a subreport of rptMain
rptMain
rptSubMain
Is it possible, based on outside parameters from a form or the main report, to dynamically set the group level of rptSubMain?
So, in rptMain
Me.rptSubMain.Report.Group
This statement gives an error message 2455 saying the expression has an invalid reference.
I've tried everything but always end up with errors saying that I cannot change the property while printing, or the report is not open or non-existent.
I'm not looking for sorting or filtering here, I need it to actually Group because the subreport is doing totals and averages based on a different query than the main report.
ASKER
Jeff,
Thank you for your response. Unfortunately I could not open your sample with Access 2000 or Access 2002. Was your sample created in a higher version?
Thank you for your response. Unfortunately I could not open your sample with Access 2000 or Access 2002. Was your sample created in a higher version?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks again.
;-)
Yes, but it is *much* easier to just insert two subreports and simply toggle the visibility.
Here is a sample
JeffCoachman
AccessEEQ-24127818DynamicGroupSu.mdb