Does anyone know of a way to iterate through the sections of a report? Oddly, each section is NOT part of a collection, but is stored in the array "me.section"
However, I tried to loop through this array, using UBound(me.section()), but that doesn't work either.
I've even resorted to trying an ugly method, iterating through index numbers until I hit an error, but this fails too:
It only iterates through:
0 Detail
1 ReportHeader
2 ReportFooter
3 PageHeaderSection
4 PageFooterSection
The rest of the sections are missing!
I'm stumped here. Any ideas would be most appreciated!
MTIA
Max Hugen
Australia
However, I tried to loop through this array, using UBound(me.section()), but that doesn't work either.
I've even resorted to trying an ugly method, iterating through index numbers until I hit an error, but this fails too:
Code:
On Error Resume Next
For i = 0 To 99
Debug.Print i, Me.Section(i).Name
If Me.Section(i).Tag = "Hide" Then _
Me.Section(i).Visible = False
If err <> 0 Then Exit For
Next i
On Error GoTo err_fNoData
It only iterates through:
0 Detail
1 ReportHeader
2 ReportFooter
3 PageHeaderSection
4 PageFooterSection
The rest of the sections are missing!
I'm stumped here. Any ideas would be most appreciated!
MTIA
Max Hugen
Australia