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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top