Aug 29 2024 06:28 PM
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
Aug 29 2024 07:26 PM
Aug 30 2024 12:57 PM - edited Aug 30 2024 01:00 PM
So should I be doing this in a different event? I thought subreports loaded before the parent report.
Aug 30 2024 04:18 PM
Aug 30 2024 05:00 PM
Aug 30 2024 05:18 PM