Option group - test if checked - really dumb question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello -

I know I've done this before, but I am coming up with zip in the way of
success now. Three checkboxes reside in an option group and they have no
default setting.

I need to make sure one is selected before the user submits the form. How
do I do this in code?
 
Hello -

I know I've done this before, but I am coming up with zip in the way of
success now. Three checkboxes reside in an option group and they have no
default setting.

I need to make sure one is selected before the user submits the form. How
do I do this in code?

If the check boxes are actually part of the Option Group then just
check to see if the option group is null.

If IsNull(Me!OptionGroupName) then
'Nothing selected
Else
'Somthing is selected
End If
 
On the before update event of the form, check if the option group is null

If IsNull(Me.OptionGroupName) Then
MsgBox "Must select value"
Cancel = True ' wont let the user continue
End If
 
Back
Top