Hi, im trying to get my radiobox to say Yes if checked, No if not checked in the database. I'm getting an error saying it is not accessible because it is 'Private". It has an issue with "Active", which is a field in my database. As if right now its just changing the Yes/No to True, because I have those 2 buttons bound right now. Any suggestions?
VB.NET:
Private Sub rbActiveStatusYes_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbActiveStatusYes.CheckedChanged
Dim intposition As Integer
Dim objcommand As SqlCommand = New SqlCommand
intposition = objcurrencyManager.Position
objcommand.Connection = objconnection
objcommand.CommandText = "SELECT Active FROM ProspectTable"
objconnection.Open()
If (Active) = True Then
rbActiveStatusYes.Checked = True
Else
rbActiveStatusYes.Checked = False
End If
objconnection.Close()
FillDataSetandView()
BindFields()
objcurrencyManager.Position = intposition
Showposition()
End Sub