Enumerate controls in a report section

  • Thread starter Thread starter Scott Smith via AccessMonster.com
  • Start date Start date
S

Scott Smith via AccessMonster.com

I'm trying to enumerate all the controls in the PageHeader and PageFooter
so the user can apply their own color to the labels and lines. However I
can't seem to get the syntax right.
 
Scott said:
I'm trying to enumerate all the controls in the PageHeader and PageFooter
so the user can apply their own color to the labels and lines. However I
can't seem to get the syntax right.


Except for A97 on Win NT, 2000 and XP, you can use:
For Each ctl In Me.Section(3).Controls

The page header is Section(3) and the footer is Section(4)

In all versions:
For Each ctl In Me.Controls
If ctl.Section = 3 Then
 
Thanks, that worked perfectly. I was using rpt.Section - it didn't dawn on
me to use clt.Section.

Thanks again!
 
Back
Top