Accessing individual row properties within a group header

C

CES

All,
I was hoping that somebody might be able to help me figure out how to correctly reference, the individual rows within a groupheader.
Me.GroupHeader2.BackColor correctly references to right section of the report and changes the background color for that section to White, however I can't figure out how to reference the individual rows that are created within the group.
I've used this section(0) successfully within a detail_format section but have never have tried to use it within a groupheader.
I would appreciate any help or guidance on what I'm doing it incorrectly. Thanks in advance.- CES



Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
Me.GroupHeader2.BackColor = vbWhite
End Sub

Private Sub GroupHeader2_Format(Cancel As Integer, FormatCount As Integer)

If Me.Section(0).BackColor = vbWhite Then
Me.Section(0).BackColor = RGB(230, 230, 230)
Else
Me.Section(0).BackColor = vbWhite
End If

End Sub
 
A

Allen Browne

In the VBA window, place the cursor in the word Section, and press F1.

The help window explains the constants you can use, such as:
acGroupLevel1Header
 
M

Marshall Barton

CES said:
I was hoping that somebody might be able to help me figure out how to correctly reference, the individual rows within a groupheader.
Me.GroupHeader2.BackColor correctly references to right section of the report and changes the background color for that section to White, however I can't figure out how to reference the individual rows that are created within the group.
I've used this section(0) successfully within a detail_format section but have never have tried to use it within a groupheader.
I would appreciate any help or guidance on what I'm doing it incorrectly. Thanks in advance.- CES



Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
Me.GroupHeader2.BackColor = vbWhite
End Sub

Private Sub GroupHeader2_Format(Cancel As Integer, FormatCount As Integer)

If Me.Section(0).BackColor = vbWhite Then
Me.Section(0).BackColor = RGB(230, 230, 230)
Else
Me.Section(0).BackColor = vbWhite
End If

End Sub


In general you can only manipulate individual details in the
detail section's events. Move the GroupHeader2 code to the
Detail section's Format event procrdure.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top