Results 1 to 6 of 6
  1. #1
    michaelh93 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2013
    Posts
    8

    Post Using VBA to hide page footers problem.

    Hi all,



    My report header is at least two pages long. The first page is the cover sheet and the second and any subsequent pages are the report summary which is held in a subreport. Depending on the size of the database this subreport will expand appropriately.

    There is no need for the footer on the cover page, as all the information given by the footer is already there and better presented. I have disabled the footer on the front page using the code:

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

    If Me.Page = 1 Then
    Me.PageFooterSection.Visible = False

    Else
    Me.PageFooterSection.Visible = True

    End If
    End Sub

    This works, but it also hides the footer on all of the report header pages instead of just the first printed page. Is this an obvious oversite? How would i go about fixing this?

    Thanks

  2. #2
    alcapps is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2012
    Posts
    292
    I would just go to the page footer section and set the property to visible = false then and you are covered..

  3. #3
    michaelh93 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2013
    Posts
    8
    But then it doesn't show up on any other page either. I want it to be on all pages except the first.

  4. #4
    alcapps is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2012
    Posts
    292
    I guess I am not understanding what you are trying to do.

    you have a page header that takes two pages. So you are not using the page footer section

    remember there is page footer section and a report footer section. Can you clarify what you are trying to do?

  5. #5
    alcapps is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2012
    Posts
    292
    If you try and use the Detail section on format your code should work.

  6. #6
    michaelh93 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2013
    Posts
    8
    I fixed it with.

    Private Sub PageFooterSection_Print(Cancel As Integer, PrintCount As Integer)
    If Me.Page = 1 Then Cancel = True
    End Sub

    Thanks all.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Header Repeats at Top Page Problem
    By KelleyM in forum Reports
    Replies: 7
    Last Post: 07-02-2012, 02:47 PM
  2. Can sum on only one of two group footers
    By hilian in forum Reports
    Replies: 6
    Last Post: 05-20-2012, 06:51 AM
  3. Problem with page formatting on form
    By robertmarkdudley95 in forum Forms
    Replies: 1
    Last Post: 03-30-2012, 03:05 AM
  4. Option Control to hide/show page tabs
    By tandridge in forum Forms
    Replies: 3
    Last Post: 12-08-2011, 10:15 AM
  5. page break problem
    By simba in forum Reports
    Replies: 0
    Last Post: 11-30-2010, 10:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums