I have 3 radio buttons on a form, not a option group. I want the user to have to choose one before closing the form. They are called: RadioButton1, RadioButton2, & RadioButton3. The following code I'm using doesn't work correctly, because I have to choose each radio button before the form closes. I want the user to only have to choose one, before the form closes. Here is the code I'm using. This is on the UnLoad Event, because the OnClose Event doesn't work with this.
Private Sub Form_UnLoad()
Dim No_Buttons_Selected As Boolean
No_Buttons_Selected = False
If Me!RadioButton1.Value = False Then
No_Buttons_Selected = True
End If
If Me!RadioButton2.Value = False Then
No_Buttons_Selected = True
End If
If Me!RadioButton3.Value = False Then
No_Buttons_Selected = True
End If
If No_Buttons_Selected Then
MsgBox "Please select a Radio Button"
Cancel = True
End If
End Sub
Can anyone help me with this problem, I would surely appreciate any help anyone can give me. Thank you all in advance, and have a WONDERFUL day!!!!
Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!
Private Sub Form_UnLoad()
Dim No_Buttons_Selected As Boolean
No_Buttons_Selected = False
If Me!RadioButton1.Value = False Then
No_Buttons_Selected = True
End If
If Me!RadioButton2.Value = False Then
No_Buttons_Selected = True
End If
If Me!RadioButton3.Value = False Then
No_Buttons_Selected = True
End If
If No_Buttons_Selected Then
MsgBox "Please select a Radio Button"
Cancel = True
End If
End Sub
Can anyone help me with this problem, I would surely appreciate any help anyone can give me. Thank you all in advance, and have a WONDERFUL day!!!!
Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!