Forms Check Box

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
 
F

fredg

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top