[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 663
  • Last Modified:

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.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.
0
huston8481
Asked:
huston8481
  • 3
  • 2
1 Solution
 
Jeffrey CoachmanMIS LiasonCommented:
huston8481,

Yes, but it is *much* easier to just insert two subreports and simply toggle the visibility.

Here is a sample

JeffCoachman
AccessEEQ-24127818DynamicGroupSu.mdb
0
 
huston8481Author Commented:
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?
0
 
Jeffrey CoachmanMIS LiasonCommented:
Here is the file in the Access 2000 format
Access-EEQ2412781DynamicChangeSu.mdb
0
 
huston8481Author Commented:
Thanks again.
0
 
Jeffrey CoachmanMIS LiasonCommented:
;-)
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now