G
Guest
Hello,
I have a bunch of radio buttons that aren't part of a group box.
I'm using code to check the values from a SQL server database, then check whichever ones should be.
But, they are acting as though they are a part of a group box...only one box can be checked at a time.
I have 6 labels, and for each label, a yes radio box and a no radio box. Only the final radio button is ever checked.
the code is as follows:
If drv("STR_RECCE_WORK").ToString = "YES" Then
radRecceYes.Checked = True
radRecceNo.Checked = False
ElseIf drv("STR_RECCE_WORK").ToString = "NO" Then
radRecceNo.Checked = True
radRecceYes.Checked = False
Else
radRecceNo.Checked = False
radRecceYes.Checked = False
End If
If drv("STR_BIO_FIELD_WORK").ToString = "YES" Then
radBioY.Checked = True
radBioN.Checked = False
ElseIf drv("STR_BIO_FIELD_WORK").ToString = "NO" Then
radBioN.Checked = True
radBioY.Checked = False
Else
radBioN.Checked = False
radBioY.Checked = False
End If
If drv("STR_LAYOUT_WORK").ToString = "YES" Then
radLayoutY.Checked = True
radLayoutN.Checked = False
ElseIf drv("STR_LAYOUT_WORK").ToString = "NO" Then
radLayoutN.Checked = True
radLayoutY.Checked = False
Else
radRecceNo.Checked = False
radRecceYes.Checked = False
End If
If drv("STR_CRUISE_WORK").ToString = "YES" Then
radCruisedY.Checked = True
radCruisedN.Checked = False
ElseIf drv("STR_CRUISE_WORK").ToString = "NO" Then
radCruisedN.Checked = True
radCruisedY.Checked = False
Else
radRecceNo.Checked = False
radRecceYes.Checked = False
End If
If drv("STR_TRAVERSE_WORK").ToString = "YES" Then
radTraversedY.Checked = True
radTraversedN.Checked = False
ElseIf drv("STR_TRAVERSE_WORK").ToString = "NO" Then
radTraversedN.Checked = True
radTraversedY.Checked = False
Else
radRecceNo.Checked = False
radRecceYes.Checked = False
End If
If drv("STR_PAINTED_WORK").ToString = "YES" Then
radPaintedY.Checked = True
radPaintedN.Checked = False
ElseIf drv("STR_PAINTED_WORK").ToString = "NO" Then
radPaintedN.Checked = True
radPaintedY.Checked = False
Else
radRecceNo.Checked = False
radRecceYes.Checked = False
End If
Thanks in advance.
amber
I have a bunch of radio buttons that aren't part of a group box.
I'm using code to check the values from a SQL server database, then check whichever ones should be.
But, they are acting as though they are a part of a group box...only one box can be checked at a time.
I have 6 labels, and for each label, a yes radio box and a no radio box. Only the final radio button is ever checked.
the code is as follows:
If drv("STR_RECCE_WORK").ToString = "YES" Then
radRecceYes.Checked = True
radRecceNo.Checked = False
ElseIf drv("STR_RECCE_WORK").ToString = "NO" Then
radRecceNo.Checked = True
radRecceYes.Checked = False
Else
radRecceNo.Checked = False
radRecceYes.Checked = False
End If
If drv("STR_BIO_FIELD_WORK").ToString = "YES" Then
radBioY.Checked = True
radBioN.Checked = False
ElseIf drv("STR_BIO_FIELD_WORK").ToString = "NO" Then
radBioN.Checked = True
radBioY.Checked = False
Else
radBioN.Checked = False
radBioY.Checked = False
End If
If drv("STR_LAYOUT_WORK").ToString = "YES" Then
radLayoutY.Checked = True
radLayoutN.Checked = False
ElseIf drv("STR_LAYOUT_WORK").ToString = "NO" Then
radLayoutN.Checked = True
radLayoutY.Checked = False
Else
radRecceNo.Checked = False
radRecceYes.Checked = False
End If
If drv("STR_CRUISE_WORK").ToString = "YES" Then
radCruisedY.Checked = True
radCruisedN.Checked = False
ElseIf drv("STR_CRUISE_WORK").ToString = "NO" Then
radCruisedN.Checked = True
radCruisedY.Checked = False
Else
radRecceNo.Checked = False
radRecceYes.Checked = False
End If
If drv("STR_TRAVERSE_WORK").ToString = "YES" Then
radTraversedY.Checked = True
radTraversedN.Checked = False
ElseIf drv("STR_TRAVERSE_WORK").ToString = "NO" Then
radTraversedN.Checked = True
radTraversedY.Checked = False
Else
radRecceNo.Checked = False
radRecceYes.Checked = False
End If
If drv("STR_PAINTED_WORK").ToString = "YES" Then
radPaintedY.Checked = True
radPaintedN.Checked = False
ElseIf drv("STR_PAINTED_WORK").ToString = "NO" Then
radPaintedN.Checked = True
radPaintedY.Checked = False
Else
radRecceNo.Checked = False
radRecceYes.Checked = False
End If
Thanks in advance.
amber