• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 139
  • Last Modified:

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
0
GPSPOW
Asked:
GPSPOW
1 Solution
 
PatHartmanCommented:
On the Format Tab of the section in question, set the "Repeat Section" property to Yes.
0
 
hnasrCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now