In the AfterUpdate event procedure of the check box ...
.... to enable the text box when the check box is checked ...
Me!NameOfTextBox.Enabled = (Me!NameOfCheckBox)
.... to disable the text box when the check box is checked ...
Me!NameOfTextBox.Enabled = Not (Me!NameOfCheckBox)
There was a bug in some versions of Access (not sure if it has been fixed)
where you could run into problems by implicitly referring to the Boolean
value of a form control, e.g. "If Me!NameOfCheckBox Then". One way to work
around this bug was to make the reference explicit, e.g. "If
Me!NameOfCheckBox = True Then". Another was to force evaluation using
parentheses - that's the reason for the parentheses in "(Me!NameOfCheckBox)"
in the examples above.
--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com
The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.