I have an Access report, which has a nested subreport. In the subreport, there is a chart, which I need to reference via VBA in order to adjust the axes.
The problem I have is that the subreport has multiple records, which fit on the same page. My VBA is triggered within the OnPrint event of the detail section of the main report (which is where the subreport containing the chart is located), and it seems that the reference to the chart is only referencing the first chart on each page.
My code is as follows:
If (Reports![Desired_Future_State Overview]![Desired_Future_State_Metric Programme Breakdown].Report![Walkup Chart].Object.Axes(2).MaximumScale) = 0 Then
Reports![Desired_Future_State Overview]![Desired_Future_State_Metric Programme Breakdown].Report![Walkup Chart].Object.Axes(2).ReversePlotOrder = True
End If
I can't see any info in the MS documentation regarding how to reference multiple instances using this syntax - is this possible, and how would I go about it?