Set MyReport as Report? Accessing CTl in a Sub-report

Daveyk01

Registered User.
Local time
Today, 10:52
Joined
Jul 3, 2007
Messages
144
Okay, banging head up against wall on this one..

In a report I used code as follows:

Dim MyReport as Report
Set MyReport = Reports!rptCertDataPage4b_Rev1
.
.
for each CTL in MyReports.Controls.....

That worked great. Now that Reports!rptCertDataPage4b_Rev1 is a subreport to a master report "rptCertData_Rev1, I can't seem to figure out how to set the "MyReport" variable/object

I tried various things like:
Dim MyReport as SubReport, etc.

What am I missing here?
 
This was aggravating. I waisted far too much time figuring this out, but I eventually did. Here is what worked:

Dim Myrepoert as Report
Set MyReport = Reports!rptcertdata_rev1.rptCertDataPage4b_Rev1.Report

I know I will forget this totally in a few months and hope I remeber to look at this code to sdee how I did it!
 

Users who are viewing this thread

Back
Top Bottom