Results 1 to 4 of 4
  1. #1
    FL_Boy is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2011
    Posts
    6

    Control Page Headers with VBA?

    I've got a report and I don't want the Page Header to displayed on the page the group header is printed on. (My group header is about the whole first page of a particular group.)


    I've seen where you can turn off page headers for report header pages. What's the best way to turn them off for group headers? I'd like to use VBA to turn them off on the on format event for the group header and then back on using the on format for the detail. Does that sound about right?

    thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Don't know, never tried. Do you have some code we could analyse? Anything found in Google search?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    FL_Boy is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2011
    Posts
    6

    Question Control Page Headers with VBA?

    I have searched a bit on google and the forums.
    I've been able to turn off the headers in the group by code, but when I turn them back on in the detail on format event, the page header section doesn't show until the 2nd and subseqent detail pages.

    I've tried forcing a new page at the group level and it doesn't help. I've also tried forcing a new page 'before section' in the detail and the page header still doesn't show up prior the 2nd page.

    Any suggestions?



    Public Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
    Me.PageHeaderSection.Visible = False
    End Sub

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Me.PageHeaderSection.Visible = True
    End Sub

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    I found a thread that appears to be your exact issue. It suggests:

    Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
    Me.PageHeaderSection.Visible = False
    End Sub

    Private Sub Report_Page()
    Me.PageHeaderSection.Visible = True
    End Sub
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Sub report page headers
    By rahayes in forum Reports
    Replies: 3
    Last Post: 11-11-2011, 04:21 AM
  2. Page Break in Report Headers
    By JonathanT in forum Reports
    Replies: 8
    Last Post: 06-30-2011, 10:37 PM
  3. Too many page headers for one report?
    By Swilliams987 in forum Reports
    Replies: 0
    Last Post: 02-14-2011, 11:36 AM
  4. Show page on tab from control on subform
    By jpkeller55 in forum Access
    Replies: 1
    Last Post: 01-24-2011, 07:55 AM
  5. Multiple Control Box on Page
    By nkenney in forum Forms
    Replies: 2
    Last Post: 10-26-2009, 10:37 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