MS-Access: Repeating Group headers on subsequent pages

I have a report built in MS-Access which works pretty well.  It has a Nested Groups.  

VisitID (Main group)  - do not keep group together on one page
     CategoryID -            keep header and first record together on one page
        NoteID  -               keep header and first record together on one page
                  Detail




There is a Page Header with the report title information which repeats on every page.

The Main Group is the VisitD.  There is a Header and Footer area.  I have the patient information in the Header area and I do not keep group together on one page.  I want the Header information to repeat on the subsequent pages.

Every subsequent page within the Main Group does not have a header.  The header only prints again when the VisitID changes.

How can make it print?

Thank you

Glen
GPSPOWAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PatHartmanCommented:
On the Format Tab of the section in question, set the "Repeat Section" property to Yes.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Hamed NasrRetired IT ProfessionalCommented:
You may achieve this by:
Have a public variable inGroup as Boolean.
Set its value to true when group is processed.
Set its value to false when group footer is processed.

In Page header, add group header info.
In page header format event, check for inGroup: if false show group header info, otherwise hid group info.

Option Compare Database
Public inGroup As Boolean

Private Sub GroupFooter2_Format(Cancel As Integer, FormatCount As Integer)
    inGroup = False
End Sub

Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
    inGroup = True
End Sub

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
    ghl.Visible = fslse
    If inGroup Then
        ghl.Visible = True
    End If
End Sub

Open in new window


Check this demo database.
Open Report1 in Print Preview
repeat-group-info.accdb
0
GPSPOWAuthor Commented:
Thank that did the trick.

Glen
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.