VBA on Subreport does not Fire (1 Viewer)

Adam Caramon

Registered User
Local time
Yesterday, 19:38
Joined
Jan 23, 2008
Messages
822
Hi all,

I have a report with some code on the Report_Load event. When I open the report, it works fine.

I also have a subreport with some code on the Report_Load event. When I open the subreport directly, it works fine.

When I add the subreport object to the report, and then open the report, the report code runs, but the subreport code does not run.

I've tried to troubleshoot by removing all code from the main report and leaving only the subreport code in place, still does not run. I've tried creating a new blank main report and then adding the subreport, subreport code still does not run. And lastly I've created a new subreport from scratch and then added it to the main report, does not run.

Any suggestions on what else I can try?

Thanks,

-Adam
 

static

Registered User.
Local time
Today, 00:38
Joined
Nov 2, 2015
Messages
823
Make the procedure public in the sub report and call it from your parent report

Code:
Private Sub Report_Load()
    YourSubReport.Report.Report_Load
End Sub
 

Adam Caramon

Registered User
Local time
Yesterday, 19:38
Joined
Jan 23, 2008
Messages
822
That did the trick - thank you.

-Adam
 

Users who are viewing this thread

Top Bottom