DaniBoy
Registered User.
- Local time
- Today, 16:55
- Joined
- Nov 18, 2001
- Messages
- 174
Hello,
I have a form where i have three check boxes. Whe am putting a record in one of the three chkboxes has to be true before I can save the record. I tried some if statements but didnt work. Here is what I tried:
Private Sub Form_beforeUpdate(Cancel As Integer)
If chkNew.Value = False And chkRepair.Value = False And chkChange.Value = False Then
MsgBox "Please Check one of the services", vbCritical
End If
End Sub
When I do it with just one check value I get the msgbox, but it goes to the next record, and when I try it with all the conditions it just dont do anything.
Any ideas? What event do I use? is my code rigght?
Thanks
Daniel
I have a form where i have three check boxes. Whe am putting a record in one of the three chkboxes has to be true before I can save the record. I tried some if statements but didnt work. Here is what I tried:
Private Sub Form_beforeUpdate(Cancel As Integer)
If chkNew.Value = False And chkRepair.Value = False And chkChange.Value = False Then
MsgBox "Please Check one of the services", vbCritical
End If
End Sub
When I do it with just one check value I get the msgbox, but it goes to the next record, and when I try it with all the conditions it just dont do anything.
Any ideas? What event do I use? is my code rigght?
Thanks
Daniel