Forum Discussion
britt1270
Aug 30, 2024Copper Contributor
Inconsistent Results Referencing Nested Subreport Property
I have placed several subreports in an unbound report's Report Header. Each subreport has two subreports. I'm trying to get the value of the Top property of the first of these sub-subreports, but I'm getting inconsistent results. The reference I'm (currently) using in the OnLoad event of the main report is:
intSubSubTop = Me.Controls(strSub1).Report.Controls(strSubSub1).Top
This works perfectly when I switch from Design View to Print View, but I get a runtime error (2455: the expression "has an invalid reference to the property Form/Report") when I open the report from the navigation pane. What's the difference between these two actions?
I've tried different variations to no avail. What do I need to do to make it work consistently?
I'm using Access 2010 on Windows 10 Pro
5 Replies
Sort By
- peiyezhuBronze ContributorWhat's the difference between these two actions?
I guess the report has loaded into memory in the first case.
When opened from pane,it has not been loaded successfully.