Disabling A Text Box On A Form

  • Thread starter Thread starter Junior
  • Start date Start date
J

Junior

I have a single view form, with several text boxes for data entry. I
also have on the form a check box.

What I would like to do is diasable one of the text boxes based on
whether or not the check box is ticked. So when check box is ticked,
one of the fields is disabled and when you uncheck the box, the field
returns to the normal enabled property.

Thanks in advance for your suggestions.

GZ
 
In the On Update property of the checkbox put:

If Me.CheckboxName = True then
Me.TextboxName.Enabled = False
Else
Me.TextboxName.Enabled = True
End If

You will need to substitute CheckboxName and TextboxName with the
actual names of your controls. Hope that helps!
 
You will probably also need to add that test to the on-current event
for records that already have the box checked or unchecked.
 
Back
Top