Results 1 to 9 of 9
  1. #1
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Report Footer (2003)

    I want to put an image, which is the company address, as a report footer, but it doesn't put it at the bottom of the page. I tried the code:-

    Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer)
    If Me.Page <> Pages Then
    Me.Address.Visible = False
    Else
    Me.Address.Visible = True
    End If


    End Sub

    but that makes the image totally invisible. I've tried it on another report, and it works. Is there any other consideration I should be looking at? Or perhaps a different method

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Report Footer (2003)

    Make sure that you have a control in the page footer that refers to [Pages], for example a text box with control source

    ="Page " & [Page] & " of " & [Pages]

    or simply

    =[Pages]

    You can make this text box hidden if you prefer. The control forces Access to calculate the number of pages. By the way, you can simplify the code to

    Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer)
    Me.Address.Visible = (Me.Page = Me.Pages)
    End Sub

  3. #3
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Report Footer (2003)

    Thanks Hans. That's worked, but I've got another problem on the same report. I have two controls, a start time and end time. I want to create a time taken control, which is the difference between the two. I have a start time of 09:30 and a end time of 11:00 and I use the formula:-
    = DateDiff("n", [Start Time], [End Time]) 60 & format(DateDiff("n",[Start Time], [End Time]) MOD 60, ":00")
    but I get 01:00 instead of 01:30

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Report Footer (2003)

    Try this:

    = DateDiff("n", [Start Time], [End Time]) 60 & ":" & Format(DateDiff("n", [Start Time], [End Time]) MOD 60, "00")

    You can also set the Format of the text box to Short Time and use control source

    =[End Time]-[Start Time]

  5. #5
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Report Footer (2003)

    Thanks again Hans.

  6. #6
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Report Footer (2003)

    Have you thought of putting this in the Report Footer rather than in the last page of the PageFooter? If so there is no code required.

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Report Footer (2003)

    My impression is that Rob wants the text at the bottom of the last page. The report footer doesn't print at the bottom of the page, it prints immediately after the last detail or group section. If that is OK for Rob, it's a much easier solution.

  8. #8
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Report Footer (2003)

    You are right, she does say that she wants it at the bottom of the last page.

  9. #9
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Report Footer (2003)

    Hans solution worked thanks Patt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •