After many attempts I am finally needing help with this...
I have a mainform with a listbox of names and what program they belong to. I also have a tab control with multiple tabs. On one of my tabs (Program) I have 2 subforms, one for people assigned to program "A" and one for who is assigned to program "B". I need to hide the appropriate tab on both actions: When the "Program" tab is clicked AND when the listbox is clicked with a different person.
On the tab control I have tried this but it doesn't seem like it works:
As far as the Sub ListBox_Click(), I'm not sure where to begin. Any input is appreciated!
I have a mainform with a listbox of names and what program they belong to. I also have a tab control with multiple tabs. On one of my tabs (Program) I have 2 subforms, one for people assigned to program "A" and one for who is assigned to program "B". I need to hide the appropriate tab on both actions: When the "Program" tab is clicked AND when the listbox is clicked with a different person.
On the tab control I have tried this but it doesn't seem like it works:
Code:
Private Sub Program_Click()
If Me.Parent!Program.Value = OCS Then
Me.frmOCS.Visible = True
Me.frmDirect.Visible = False
End If
If Me.Parent!Program.Value = DIRECT Then
Me.frmDirect.Visible = True
Me.frmOCS.Visible = False
End If
End Sub
As far as the Sub ListBox_Click(), I'm not sure where to begin. Any input is appreciated!