Forms Check Box

  • Thread starter Thread starter Froto
  • Start date Start date
F

Froto

Need to know how I would code for the following. I have a
Checkbox on my form, with two required text boxes below
it, and what I would need to happen is once a user
selects the checkbox, they would automatically be
required to enter values into the two textboxes, the user
would not be allowed to proceed further until the above
is completed. Any help would be appreciated.

Thank you
 
Need to know how I would code for the following. I have a
Checkbox on my form, with two required text boxes below
it, and what I would need to happen is once a user
selects the checkbox, they would automatically be
required to enter values into the two textboxes, the user
would not be allowed to proceed further until the above
is completed. Any help would be appreciated.

Thank you

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
 
Back
Top