Refering to Controls array of group header levels gives an error

  • Thread starter Thread starter Savvoulidis Iordanis
  • Start date Start date
S

Savvoulidis Iordanis

It seems I can't get any reference to any of the controls of a group header
section. The code hangs on i=0

Private Sub GroupHeader1_Format(Cancel As Integer, FormatCount As Integer)
Dim i As Integer

For i = 0 To Me.Section(acGroupLevel1Header).Controls.Count - 1
MsgBox Me.Section(acGroupLevel1Header).Controls(i).Name
Next
End Sub

Why? This works perfectly on any other section I had to deal with (detail,
page header, group footer...)

I need this in order to reposition the controls of the section, before the
report is displayed/printed

TIA
 
There was a bug with Windows XP messing up the reference to section controls
in an Access 97 database.

The other alternative, might be to loop through all the controls in the
report, and see which Section they belong to:
For Each ctl in Me.Controls
If ctl.Section ...
 
Thanks, it worked. I just wanted it to be the fastest it could.

Anyway, which are the latest updates someone should have for Access 2000, on
W2000?
 
Back
Top