G
Guest
I'm merely trying to hide some controls with the "CP" Tag if the selection
"Critical Period" is chosen in the list box.
Code isn't working. Can anyone spot the problem?
Private Sub lstProd_Type_AfterUpdate()
Dim C As Control
Select Case [lstProd_Type]
Case "Critical Period"
For Each C In Me.Controls
If C.Tag = "CP" Then
C.Visible = True
End If
Next
Case Else
For Each C In Me.Controls
If C.Tag = "CP" Then
C.Visible = False
End If
Next
End Select
"Critical Period" is chosen in the list box.
Code isn't working. Can anyone spot the problem?
Private Sub lstProd_Type_AfterUpdate()
Dim C As Control
Select Case [lstProd_Type]
Case "Critical Period"
For Each C In Me.Controls
If C.Tag = "CP" Then
C.Visible = True
End If
Next
Case Else
For Each C In Me.Controls
If C.Tag = "CP" Then
C.Visible = False
End If
Next
End Select