R
RobUCSD
With the code below I'm trying to make pages on a tab control visible or not
based on the type of visit. I'ts in the lstVisit_GotFocus event. I don't get
any error messages but it doesn't do anything either. All tabs are visible.
Any help would be greatly appreciated. Thanks, Rob
*********************************************************
Private Sub lstVisit_GotFocus()
On Error GoTo lstVisit_GotFocus_Error
If Me.VisitType = "Ablation" Then
Me.pgAblations.Visible = True
Me.pgCardioversions.Visible = False
Me.pgClinicVisits.Visible = False
Me.pgDevices.Visible = False
Me.pgTilts.Visible = False
Else: Me.VisitType = "Device"
Me.pgAblations.Visible = False
Me.pgCardioversions.Visible = False
Me.pgClinicVisits.Visible = False
Me.pgDevices.Visible = True
Me.pgTilts.Visible = False
End If
Me.Form.AllowEdits = True
Me.Refresh
On Error GoTo 0
Exit Sub
lstVisit_GotFocus_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure
lstVisit_GotFocus of VBA Document Form_frmVisitNewEdit"
End Sub
based on the type of visit. I'ts in the lstVisit_GotFocus event. I don't get
any error messages but it doesn't do anything either. All tabs are visible.
Any help would be greatly appreciated. Thanks, Rob
*********************************************************
Private Sub lstVisit_GotFocus()
On Error GoTo lstVisit_GotFocus_Error
If Me.VisitType = "Ablation" Then
Me.pgAblations.Visible = True
Me.pgCardioversions.Visible = False
Me.pgClinicVisits.Visible = False
Me.pgDevices.Visible = False
Me.pgTilts.Visible = False
Else: Me.VisitType = "Device"
Me.pgAblations.Visible = False
Me.pgCardioversions.Visible = False
Me.pgClinicVisits.Visible = False
Me.pgDevices.Visible = True
Me.pgTilts.Visible = False
End If
Me.Form.AllowEdits = True
Me.Refresh
On Error GoTo 0
Exit Sub
lstVisit_GotFocus_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure
lstVisit_GotFocus of VBA Document Form_frmVisitNewEdit"
End Sub