Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Mar 2002
    Posts
    164
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hide Report Page Footer (Access 2003 SP1)

    I have an invoice I populate from a query in Access. At the bottom of the report or invoice, I have a coupon that exisits in the page footer. Based on a check box field in my query (yes/no), I'd like to hide the page footer. Is this possible?

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Hide Report Page Footer (Access 2003 SP1)

    Hi Muscle

    Yes it is possible, without an example of your work, I will work blind and give you an example of how it should look:

    Private Sub PageFooter1_Format(Cancel As Integer, FormatCount As Integer)

    If Me.Coupon = True Then

    Me.PageFooter1.Visible = False

    Else

    End If
    End Sub

    Obviously change the name in the code to reflect the name/value of your PageFooter...I hope this is what you are looking for?
    Jerry

  3. #3
    2 Star Lounger
    Join Date
    Mar 2002
    Posts
    164
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hide Report Page Footer (Access 2003 SP1)

    Hi Jerry,

    Thanks for the response. I gave your code a try, but can't get it to work correctly. Here is what I have so far...

    Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer)
    If ACH_Status = Yes Then
    Me.PageFooterSection.Visible = False
    Else
    End If
    End Sub

    Basically if ACH_Status is = Yes, then I want the section to be hidden. Otherwise, display the footer. At the moment, the code above hides the footer no matter what. Thanks again for your assistance.

  4. #4
    2 Star Lounger
    Join Date
    Mar 2002
    Posts
    164
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hide Report Page Footer (Access 2003 SP1)

    I revised my code and came up with the following...

    Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer)
    If Me.ACH_Status = True Then
    Me.PageFooterSection.Visible = False
    Else
    Me.PageFooterSection.Visible = True
    End If
    End Sub

    This works for the first ACH_Status that is true. But it does not reset on the next example. It corrects itself in a later instance and then messes up again. It's almost like it sets a session and doesn't reset. Any clues...

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

    Re: Hide Report Page Footer (Access 2003 SP1)

    Try the use of the Cancel = True if you want to hide it, rather than the visible property.

    If that doesn't work, try your code in the PageFooterSection_Print section and see if it makes any differnece.

  6. #6
    2 Star Lounger
    Join Date
    Mar 2002
    Posts
    164
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hide Report Page Footer (Access 2003 SP1)

    Patt,

    The Cancel=True code worked perfectly. Thank you, thank you, thank you!!!

Posting Permissions

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