Results 1 to 2 of 2
  1. #1
    csmith is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Sep 2016
    Location
    Indiana
    Posts
    14

    Alternating Headers and Footers displayed

    Hi All,

    Is there a way to alternate the display of page header and report footer? So on page 1 I see the page header, page 2, the page footer, and so on. I cannot write code and don't even know where to put the code. Any help is appreciated. Any code, is appreciated but I need to know where to put it and how--always willing to try and learn something new. Thanks!

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    The easiest way to explain it is that you will need to place code in the OnFormat event. The problem is, there are several OnFormat events. Different sections have an OnFormat event. As the Report renders, different sections are formatted. In other words, one section, like a detail header is formmated at a different time the Report footer section is formatted.

    In the Page Footer On Format event, you should be able to have access to the Page and Pages property. So, I would start by placing some code in there to see if you can accomplish what you need. Maybe you can set the Visisble property of the Footer you want to affect to = No. Then, change it to visible via VBA code.


    Understand that there are default names given to these sections. You may want to rename them before referencing them in your code and before creating any event handlers.
    Code:
    If me.Page = Me.Pages then
    
        me.NameOfSection.Visible = True
    
    end if

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

Similar Threads

  1. Footers in a subform?
    By brich in forum Forms
    Replies: 2
    Last Post: 11-28-2014, 10:35 PM
  2. Alternating colors in a report
    By 97rstd in forum Reports
    Replies: 6
    Last Post: 07-29-2014, 02:14 AM
  3. Replies: 2
    Last Post: 03-09-2014, 03:21 PM
  4. Can sum on only one of two group footers
    By hilian in forum Reports
    Replies: 6
    Last Post: 05-20-2012, 06:51 AM
  5. Alternating Greenbar report
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 08-30-2010, 10:05 PM

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