subreport not picking up on properties set on main report

D

Darrell

In have created a "main" report to house 2 subreports (A and B). There
is not a record source for the main report.

I have two subreports on one main report. Each of these needs to utilize
a user-supplied Begin Date and End Date to set their RecordSource. I
collect these with 2 input boxes, then store in class.begindate and
class.enddate On Open of the main report where I also instantiate the
class. The class is declared as Public in a global module.

When I open the main report and On Open of subreport A fires, the
RecordSource references class.begindate and class.enddate perfectly. The
frustrating part is that when On Open of subreport B fires, the
class.begindate and class.enddate are flagged as "Object variable or
With block variable not set".

What am I missing?

Thanks, as always, for all help.

Darrell
 
Top