Validation with option button group

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

Guest

Please help.
I would like to insert a code where if a user does not select a location,
they will receive a message box that an entry is required. The locations are
in an option button group. Thanks!!!
 
hi,
I would like to insert a code where if a user does not select a location,
they will receive a message box that an entry is required. The locations are
in an option button group. Thanks!!!

Private Sub Form_BeforeUpdate(Cancel As Integer)

If IsNull(nameOfOptionGroup.Value) Then
Cancel = True
MsgBox "Please enter a location."
End If

End Sub


mfG
--> stefan <--
 
Back
Top