I have 2 different subforms in a tab control (TabCtl124).
When i open main form (RacesetupF), i would like 2 of the tab control and their subforms to be hidden except tabcontrol 1 and its subform as default.
I have a checkbox control called TimeCBox with the 3 different options.
The following code hide the Tab control on startup
then i will need code to call up
AS you open one subform in checkbox, the others must be invisible
Please help it is not working.
When i open main form (RacesetupF), i would like 2 of the tab control and their subforms to be hidden except tabcontrol 1 and its subform as default.
I have a checkbox control called TimeCBox with the 3 different options.
The following code hide the Tab control on startup
Code:
Me.TabCtl124.Visible = false
Code:
Private Sub TimeCBox_Click()
On Error GoTo TimeCBox_Click_Err
If Forms![RaceSetupF]![TimeCBox] = 1 Then Me.TabCtl124.Pages(1).Visible = True
If Forms![RaceSetupF]![TimeCBox] = 2 Then Me.TabCtl124.Pages(2).Visible = True
If Forms![RaceSetupF]![TimeCBox] = 3 Then Me.TabCtl124.Pages(3).Visible = True
TimeCBox_Click_Exit:
Exit Sub
TimeCBox_Click_Err:
MsgBox Error$
Resume TimeCBox_Click_Exit
End Sub
Please help it is not working.
Comment