Results 1 to 4 of 4
  1. #1
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    570

    Hide text boxes when Report Footer displays

    There is one text box I want to hide when the Report Footer page is reached. This text box should appear on all pages except when the is reached. I can't find an event that will change the text box visible property to false only the last page. I've tried this.



    Code:
     
        Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
           Me.txtFacilityTitle.Visible = False
           Me.txtFacilityName.Visible = False
        End Sub
    and this. Neither works. I prefer to keep the FacilityName on the Page Header, but when it displays on the Grand Total page it is confusing and inaccurate. My only other solution is to put it in the Facility Group Header, but for cosmetic reasons I would rather not.

    Code:
    Private Sub ReportFooter_Paint()
        Me.txtFacilityTitle.Visible = False
        Me.txtFacilityName.Visible = False
    End Sub
    Thanks, Paul

  2. #2
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    If Me.Page=Me.Pages then set it to invisible.

  3. #3
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    570
    I see the logic, but I'm having trouble making it work. I am using the On Page event which only seems to run in certain circumstances, like when I page forward one page at a time. When I skip ahead 50 pages using the navigation box the procedure doesn't run. I commented out the second message box so I could page through to the end. When I page forward from page 154 of 155 I get the msgbox 155 - 155, but the text box does not disappear. I get the message box first, then the last page pops up with the title still showing. What event should I be using?

    Code:
    Private Sub Report_Page()
        If Me.Page = Me.Pages Then
            MsgBox Me.Page & "-" & Me.Pages
            Me.txtFacilityTitle.Visible = False
        Else
    '        MsgBox Me.Page & "-" & Me.Pages
            Me.txtFacilityTitle.Visible = True
        End If
    End Sub
    For my purposes, I've gone back to putting facility in the group header. I want to get this off my desk, but I wouldn't mind knowing for future reference.
    Thanks, Paul

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    21,716
    I would try the format event of the section containing the textboxes.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 06-29-2017, 03:02 PM
  2. Hide report label when text box is null/blank
    By crsport3 in forum Access
    Replies: 7
    Last Post: 10-30-2013, 07:14 AM
  3. Replies: 2
    Last Post: 06-06-2012, 10:53 AM
  4. Replies: 5
    Last Post: 09-02-2011, 03:44 PM
  5. Replies: 3
    Last Post: 02-17-2011, 10:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums - Senior Forums