Dynamic subreport group level control source
Posted on 2009-02-09
Using Microsoft Access 2000
Is it possible to dynamically set the Group Level Control source of a subreport?
Given two reports where rptSubMain is a subreport of rptMain
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.GroupLevel(0).ControlSource = ""
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.