Access: How to print a report footer at the end of the last page.

In MS Access, a report footer only shows at the end of the report, not the end of last page. In my Microsection report, I want a fixed height signature area to be at the end of last page. In that way it just looks professional.

Microsoft KB 208979 introduced three methods to achieve it.

  • Place the information in the report’s page footer, which is always printed at a fixed location. (really not what I want)
  • Set the report properties for the footer section. (the one I used)
  • Set the report properties for the detail section. ( have not had a chance to try it)
  • The 2nd method is the one I used, it involves using the repot’s MoveLayout, PrintSectoin, and NextRecord properties.
    Create a function named SetGrpFtrLoc in the repot’s module section.

    Function SetGrpFtrLoc(Rpt as Report, GrpFtrLoc as Double)
    GrpFtrLoc=GrpFtrLoc*1440 'Convert from inches to twips.
    If < GrpFtrLoc Then 'Not at location yet, so
    Rpt.movelayout = True 'move to next print location.
    Rpt.nextrecord = False 'Do not go to next record.
    Rpt.printsection = False 'Do not print the section.
    End If 'Until the required offset is reached
    End Function

    Create a dummy group and set it to “One to Many” relation so that all sections will show up. Set the dummy group to be the very top level in the “grouping and sorting” of the report and show only the footer of the dummy group. Set the dummy footer properties as follow:
    Height: 0.3 in. (or the height of the signature area)
    ForceNewPage : After Section
    OnFomat: = SetGrpFtrLoc([Report], 10)

    The parameter 10 indicated that I want the signature area to begin at least 10 inches from the top of the page. The calculation is following: my page margin is 0.25, page footer is about 0.33 and the page is 11 inch high. Some margin need to be preserved between signature area and page footer.

    Different ways to achieve this can be found at various forums, but I found the one from Microsoft KB is the most straight forward one.

    You can not add report footer if you go this way! The footer will appear after the end of group footer.