Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Force report header to bottom of page

Status
Not open for further replies.

EagleTempest

Technical User
Jun 15, 2004
125
CA
Access 2002

I'm creating a report for invoicing.

How can I force the report header to be always be at the bottom of the page instead by after the last detail section.
 
hi. I'm confused by this statement "...instead by after the last detail section"

How about using a Report Footer?
 
Sorry I must have been tired, I meant report footer.

By default the report footer is after the last record. But if there is only one record, I'd like to force the report footer to be at the bottom on the page.
 
This is taken from CautionMP's post which lists an MS link on how to do this:
I tweaked as follows:

In the Report Footer's OnFormat property, paste in this code:
Code:
Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
      Dim GrpFtrLoc As Integer
      GrpFtrLoc = 9 'Change this to whatever inches you want
      GrpFtrLoc = GrpFtrLoc * 1440    'Convert from inches to twips.

      If Me.Top < GrpFtrLoc Then     'Not at location yet, so
         Me.MoveLayout = True        'move to next print location.
         Me.NextRecord = False       'Do not go to next record.
         Me.PrintSection = False     'Do not print the section.
      End If

End Sub

Change the first line (GrpFtrLoc = 9) to be whatever inches you want.
 
That's awesome!

I just had to figure out that the 9 inches in your example starts from the bottom of the top page margin.
 
One other question? I seem to have a blank second page. I have Force New Page: None in the ReportFooter properties.

I do have a page footer but have positioned my reportfooter only half way down the page as a test but I still have a second page.

Is there anything I need to set in Sorting and Grouping?
 
Never mind. I played with the page margins and now everything is oh so wonderful. I think my page width was just slightly to wide. I had also checked my dividing line lengths but they were shorter than the page width.

So thanks again for your great help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top