Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Schenectady, New York, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Change Report Title (2003)

    I have a report that uses a combobox in the page header. There are up to 18 possible owners. The report footer contains a grand total for all the items . The problem is that the Page Header contains the ownership of the last record reported. Is there a way to determine when I've processed the last record and change the Page Header to make the combobox invisible and a label visible for the Grand Total Page?

    Thank you
    Don
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18> <img src=/S/flags/NewYork.gif border=0 alt=NewYork width=30 height=18> "Life on Earth is expensive, but at least it includes a free trip around the Sun."

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

    Re: Change Report Title (2003)

    You must have a text box in the page header or footer that refers to the total number of pages, e.g. a text box with record source
    ="Page " & [Page] & " of " & [Pages]
    or simply
    =[Pages]
    This forces Access to determine the number of pages. The text box can be hidden if you don't want to see the number of pages. You can use this in the On Format event of the page header:

    Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
    If Me.Page = Me.Pages Then
    Me.cboComboBox.Visible = False
    Me.lblSomeLabel.Visible = True
    End If
    End Sub

  3. #3
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Schenectady, New York, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Change Report Title (2003)

    Thanks Hans. <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    Don
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18> <img src=/S/flags/NewYork.gif border=0 alt=NewYork width=30 height=18> "Life on Earth is expensive, but at least it includes a free trip around the Sun."

  4. #4
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Schenectady, New York, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Change Report Title (2003)

    This works great Hans. Just wanted to make an addition incase a newbie to Access is using this post.

    If you are previewing the report first and then printing use the following format:

    Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
    If Me.Page = Me.Pages Then
    Me.cboComboBox.Visible = False
    Me.lblSomeLabel.Visible = True
    Else
    Me.cboComboBox.Visible = True
    Me.lblSomeLabel.Visible False
    End If
    End Sub

    If not followed the Report will display the label and not the combobox.
    Don
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18> <img src=/S/flags/NewYork.gif border=0 alt=NewYork width=30 height=18> "Life on Earth is expensive, but at least it includes a free trip around the Sun."

Posting Permissions

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