Disabling A Text Box On A Form

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
 
J

jleckrone

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!
 
R

Ron2006

You will probably also need to add that test to the on-current event
for records that already have the box checked or unchecked.
 

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