Require information on a form!

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

Guest

I have several fields in a form that the end user is supposed to check at
lease one, sometimes the fields checked could be more that one. The
properties of those fields are not required because each record entered is
different, how do make the end user at least check one of the checkboxes

E.g of what I have in the check boxes to name just a few

Other, verified infor, consent, update
 
You could use something like this in the BeforeUpdate event of your form.

If (Me.Other = 0 Or IsNull(Me.Other)) And _
(Me.Verified_info = 0 Or IsNull(Me.Verified_info)) And _
(Me.consent = 0 Or IsNull(Me.consent)) And _
(Me.update = 0 Or IsNull(Me.update)) Then
MsgBox "Please check one of the check boxes"
Cancel = True
End If

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html
 
Thanks alot, that helped!

Lynn Trapp said:
You could use something like this in the BeforeUpdate event of your form.

If (Me.Other = 0 Or IsNull(Me.Other)) And _
(Me.Verified_info = 0 Or IsNull(Me.Verified_info)) And _
(Me.consent = 0 Or IsNull(Me.consent)) And _
(Me.update = 0 Or IsNull(Me.update)) Then
MsgBox "Please check one of the check boxes"
Cancel = True
End If

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html
 
Back
Top