Unique page 1 header AND footer

SueBK

Registered User.
Local time
Tomorrow, 06:03
Joined
Apr 2, 2009
Messages
197
I'm trying to create a report that has images (logos/branding) in the header and the footer of the first page only. On page 2 onwards the footer has a report title and page number; no header.

I can easily set up the images in the header of the first page using the report header; but I can't work out how to set up the first page footer.
 
You want to show certain controls on the Page Footer on the first page only along with the controls/logos on the Report Header. In other words you want to hide certain controls in the Page Footer from 2nd page onwards.

Use the following Code in the Page Footer Format Event Procedure:

Code:
Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer)
If [Page] > 1 And FormatCount = 1 Then
   [Text15].Visible = False
Else
   [Text15].Visible = True
End If
End Sub

Give the Control(s) Name(s) correctly in the above routine to show them on first page and hide them from second page onwards.
 
I don't know whether or not this was ever resolved but it seemed impossible to set the Page Footer to Invisible so mentioned above you have to make the all the control contained on the footer Invisible after Page 1. Whlist this works it is pretty tedious so can also try putting all the Footer information into a subForm and then all you have to is (a Sub or Function):

Code:
Function ExhibitionsConsignment_Hide()

    With CodeContextObject
        If .Page <> 1 Then
            .[Exhibitions Galleries Details].Visible = False
        Else
            .[Exhibitions Galleries Details].Visible = True
        End If
    End With

End Function

Simon
 
Thank you so much! I really appreciate your response, AND that you gave me the code. I often know Access will do what I want, and someone will say "just code it like this" but the nitty-gritty of the full stops and commas and quote marks escapes me and I waste 2 hours wandering in the wilderness.
My footer is an image so I used the first code, but I'll keep the sub-report in the footer tucked away in my memory.
 

Users who are viewing this thread

Back
Top Bottom