F
Froto
I received this code from Fredg
Code the Check Box AfterUpdate event:
If Me![CheckBoxName] = -1 Then
[ControlA].SetFocus
End If
Code the [ControlA] Exit Event:
If IsNull(Me![ControlA]) Then
MsgBox "Yopu must enter data in this control."
Cancel = True
Else
[ControlB].SetFocus
End If
Code The ControlB exit event:
If IsNull(Me![ControlB]) Then
MsgBox "You must enter data in this control."
Cancel = True
End If
This code works great, but the problem is when the user
checks the checkbox accidentaly, it doesn't allow him to
uncheck the box, but keeps popping up with the msgbox,
how would I keep the code the way it is because it works
great once checked, but just to give the user the ability
to uncheck the checkbox. Thanks for all the help
Code the Check Box AfterUpdate event:
If Me![CheckBoxName] = -1 Then
[ControlA].SetFocus
End If
Code the [ControlA] Exit Event:
If IsNull(Me![ControlA]) Then
MsgBox "Yopu must enter data in this control."
Cancel = True
Else
[ControlB].SetFocus
End If
Code The ControlB exit event:
If IsNull(Me![ControlB]) Then
MsgBox "You must enter data in this control."
Cancel = True
End If
This code works great, but the problem is when the user
checks the checkbox accidentaly, it doesn't allow him to
uncheck the box, but keeps popping up with the msgbox,
how would I keep the code the way it is because it works
great once checked, but just to give the user the ability
to uncheck the checkbox. Thanks for all the help