Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / November 2006

Tip: Looking for answers? Try searching our database.

Accessing individual row properties within a group header

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CES - 28 Nov 2006 22:51 GMT
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
Allen Browne - 29 Nov 2006 01:38 GMT
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

Signature

Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> All,
> I was hoping that somebody might be able to help me figure out how to
[quoted text clipped - 21 lines]
>
> End Sub
Marshall Barton - 29 Nov 2006 06:15 GMT
>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.
[quoted text clipped - 14 lines]
>
>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.

Signature

Marsh
MVP [MS Access]

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.