Select Case problem

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
 
R

RobUCSD

Never mind everybody, I figured it out right after I sent the msg. Hope
everyone has a great night and good luck in the upcomming week. Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top