Access report: page title on the second page for each part

I want to display the title only on the second page and beyond, except for the PER entry. The first page of the new part should not have a visible page title.

I originally had the following code

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
    Me.PageHeaderSection.Visible = Not (Me.Page = 1)
End Sub

It displays the title on a page other than the first.

I want the title to be visible after the first page (but not including the first page) for each group.

+3
source share
3 answers

I created this simple element that seems to do the trick. Basically, for each page, it checks to see if the group matches the previous one. If it is different, it assumes that it is the first page of the group and does not display the title.

'At the top of the module window I created a "Module-Level Variables".
Dim current_group As Integer
Dim temp_group As Integer

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

    current_group = Int(Me.MyGroupID)

    If current_group = temp_inst Then
        Me.PageHeaderSection.Visible = True
    Else
        Me.PageHeaderSection.Visible = False
    End If

    temp_group = current_group    
End Sub
0

.

!

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

    Me.PageHeaderSection.Visible = Not (Me.Page = 1)
    Debug.Print "Page " & Me.Page & " Visible = " & Not (Me.Page = 1)

End Sub
+4

In the "Sort and group for report" section, add a field that identifies the record and which you want to group. In the OnFormat event of this section header, do the same thing you do above: RecordHeader.Visible = (Me.Page <> 1)

0
source

All Articles