Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Visibility problem (Access03)

    I have a form with a tab control which I have used for several years that is now not working correctly. When I click on the Attendence or the Future tab cmdReports and cmdCerts buttons are to be displayed. Now they only display when the Future tab is clicked on. I haven't added new tabs. I have checked that the tab numbers are correct Attendance is Page Index 5 and Future is Page Index 6. Below is the code. What issues could make the cmd buttons fail to show when the tab is clicked? Thank you. Fay

    Private Sub Attendance_Click()
    Me.cmdReports.Visible = True
    Me.cmdCerts.Visible = True
    End Sub

    Private Sub Future_Click()
    Me.cmdReports.Visible = True
    Me.cmdCerts.Visible = True
    End Sub

    Private Sub Orientation_Click()
    Me.cmdDeptCompCklist.Visible = True
    Me.cmdCompCheck.Visible = True
    End Sub

    Private Sub tabPages_Change()
    Me.cmdReports.Visible = (Me.tabPages.Value = 5)
    Me.cmdCerts.Visible = (Me.tabPages.Value = 5)
    Me.cmdReports.Visible = (Me.tabPages.Value = 6)
    Me.cmdCerts.Visible = (Me.tabPages.Value = 6)
    Me.cmdDeptCompCklist.Visible = (Me.tabPages.Value = 1)
    Me.cmdCompCheck.Visible = (Me.tabPages.Value = 1)
    End Sub

    Private Sub Form_Open(Cancel As Integer)
    DoCmd.Maximize
    txtRosterStart.Visible = False
    txtRosterEnd.Visible = False
    lblRosterStart.Caption = ""

    Me.cmdReports.Visible = False
    Me.cmdCerts.Visible = False
    Me.cmdDeptCompCklist.Visible = False
    Me.cmdCompCheck.Visible = False
    End Sub

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

    Re: Visibility problem (Access03)

    Have you taken into account that the first tab page of the tab control has index 0, the second one index 1 etc.?

    Also, the On Click event of a tab page doesn't occur when the user clicks on the tab at the top, but when the user clicks in an empty part of the tab page.

  3. #3
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Visibility problem (Access03)

    Yes, I actually looked at the properties dialog box instead of counting the pages. I just checked the buttons do show when I touch somewhere on the Attendance tab. But why do they show when I click on the tab itself for future? I think I am okay now. Just baffled with the future tab. Thanks Fay

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

    Re: Visibility problem (Access03)

    In the 4 lines

    Me.cmdReports.Visible = (Me.tabPages.Value = 5)
    Me.cmdCerts.Visible = (Me.tabPages.Value = 5)
    Me.cmdReports.Visible = (Me.tabPages.Value = 6)
    Me.cmdCerts.Visible = (Me.tabPages.Value = 6)

    the first two (with Value = 5) will always be overruled by the last two (with Value = 6), so the first two lines don't have any effect.

Posting Permissions

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