G
Guest
I'm using Access 2000 and am trying to hide a page within a tab control from
a selection from an option group. For example, my option group contains
three choices: Employee Only, Dependents Only, or Both. If I've selected
either Dependents Only or Both, then I'd like to continue seeing the tab
Dependent Info tab. However, if I select Employee Only, then I want to hide
the Dependent Info tab. I've tried the following; however, when I scroll
through my records the Dependent Info tab is not consistently hidden when
need be.
Private Sub OptFrmAppType_AfterUpdate()
Select Case OptFrmAppType.Value
Case 1 'Employees
Me.EmployeeInfo.Visible = True
Me.DependentInfoTab.Visible = False
Case 2 'Dependents
Me.DependentInfoTab.Visible = True
Me.EmployeeInfo.Visible = True
Case Else 'Both
Me.EmployeeInfo.Visible = True
Me.DependentInfoTab.Visible = True
End Select
End Sub
a selection from an option group. For example, my option group contains
three choices: Employee Only, Dependents Only, or Both. If I've selected
either Dependents Only or Both, then I'd like to continue seeing the tab
Dependent Info tab. However, if I select Employee Only, then I want to hide
the Dependent Info tab. I've tried the following; however, when I scroll
through my records the Dependent Info tab is not consistently hidden when
need be.
Private Sub OptFrmAppType_AfterUpdate()
Select Case OptFrmAppType.Value
Case 1 'Employees
Me.EmployeeInfo.Visible = True
Me.DependentInfoTab.Visible = False
Case 2 'Dependents
Me.DependentInfoTab.Visible = True
Me.EmployeeInfo.Visible = True
Case Else 'Both
Me.EmployeeInfo.Visible = True
Me.DependentInfoTab.Visible = True
End Select
End Sub