Help

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

Froto

I need help with code to have a checkbox on a form that
once checked it forces the user to fill in values in
textboxes that are below each checkbox before they are
able to move to another textbox on the form, I also need
to give the user the ability to uncheck the box if they
need to.
Thank you for the help in advance
 
I need help with code to have a checkbox on a form that
once checked it forces the user to fill in values in
textboxes that are below each checkbox before they are
able to move to another textbox on the form, I also need
to give the user the ability to uncheck the box if they
need to.
Thank you for the help in advance

ummm...

your users will HATE you for this.

The whole point of a graphical user interface is that the user should
be able to enter data in (almost) any desired order.

What you can do, if you insist, is to set the Enabled property of each
textbox to False in the Form's Current event. Then in the AfterUpdate
event of each checkbox, set the Enabled property back to True. You
don't say what you want to happen when you uncheck the box, but the
same AfterUpdate event can be used to do it.

Private Sub chkX_AfterUpdate()
If Me!chkX = True Then
Me!txtX.Enabled = True
Else
<do something else>
End If
<etc for the other controls>
End Sub
 
Back
Top