So i have 3 radio buttons and two text boxes.
When radio button 1 or 2 is clicked it sets the username and password (defaults)
When third button is clicked it's suppose to check if textbox1 (user) and textbox2 (pass) are blank or filled.
If either is blank I want it to set back to radio button 1 and do nothing except pop a msgbox.
If both are filled I want it to set the username and password and stay checked on radio button 3.
However the msgbox comes up twice, so I searched and it has to do with the fact that i checked mwsuserpass1... so if i remove that it only displays one msgbox.. however then it remains on selection 3. I want to revert to radio button 1.
When radio button 1 or 2 is clicked it sets the username and password (defaults)
When third button is clicked it's suppose to check if textbox1 (user) and textbox2 (pass) are blank or filled.
If either is blank I want it to set back to radio button 1 and do nothing except pop a msgbox.
If both are filled I want it to set the username and password and stay checked on radio button 3.
Code:
Private Sub MWSUserPass3_CheckedChanged(sender As Object, e As EventArgs) Handles MWSUserPass3.CheckedChanged
If MWSUser.Text = "" Or MWSPass.Text = "" Then
'MsgBox(MWSUser.Text & " " & MWSPass.Text) 'debug
MWSUserPass1.Checked = True
End If
If Not MWSUser.Text = "" And Not MWSPass.Text = "" Then
strMWSUsername = MWSUser.Text
strMWSPassword = MWSPass.Text
End If
End Sub






