T
Terry
Hello
I am trying to use the Select Case to do the following, but I get an error
saying "End Select without Select Case" :
Here is my select statement
Dim x As String
x = Form.ActiveControl.Name
For Each chk In Me.Controls
Select Case Left(chk.Name, 2)
Case Is = "ch"
If Not chk.Name = x Then
If Left(chk.Name, 2) = "ch" Then chk.Value = False
End If
Case Is = "ck"
If Not chk.Name = x Then
If Left(chk.Name, 2) = "ck" Then chk.Value = False
chk.Value = False
End If
Case Is = "C_"
If Not chk.Name = x Then
If Left(chk.Name, 2) = "C_" Then chk.Value = False
chk.Value = False
End If
Case Is = "c-"
If Not chk.Name = x Then
If Left(chk.Name, 2) = "c-" Then chk.Value = False
chk.Value = False
End If
Case Else: End Select
End Select
Next
My objective here is to basically do the same as what option buttons do
(only allow 1 selection for each category (ch*, ck*,C_*,c-*))
Any suggestions?
Thank you so much
Terry V
I am trying to use the Select Case to do the following, but I get an error
saying "End Select without Select Case" :
Here is my select statement
Dim x As String
x = Form.ActiveControl.Name
For Each chk In Me.Controls
Select Case Left(chk.Name, 2)
Case Is = "ch"
If Not chk.Name = x Then
If Left(chk.Name, 2) = "ch" Then chk.Value = False
End If
Case Is = "ck"
If Not chk.Name = x Then
If Left(chk.Name, 2) = "ck" Then chk.Value = False
chk.Value = False
End If
Case Is = "C_"
If Not chk.Name = x Then
If Left(chk.Name, 2) = "C_" Then chk.Value = False
chk.Value = False
End If
Case Is = "c-"
If Not chk.Name = x Then
If Left(chk.Name, 2) = "c-" Then chk.Value = False
chk.Value = False
End If
Case Else: End Select
End Select
Next
My objective here is to basically do the same as what option buttons do
(only allow 1 selection for each category (ch*, ck*,C_*,c-*))
Any suggestions?
Thank you so much
Terry V