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
Expand|Select|Wrap|Line Numbers
- Me.TabCtl124.Visible = false
Expand|Select|Wrap|Line Numbers
- 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.