On Click enter text into a text object

How do you allow the user to enter text into a txt object when the user clicks a check box?

I want the user to be able to add a comment when they click a check box on a form.

The comment will later be added into a table that stores all the entries from the form.

Who is Participating?
Scott McDaniel (Microsoft Access MVP - EE MVE )Connect With a Mentor Infotrakker SoftwareCommented:
You can Disable and/or Lock the textbox until the user checks your box.

In the Current event of the form:

Me.YourTextbox.Enabled = False
Me.YourTextbox.Locked = True

In the Click event of your Checkbox:

Me.YourTextbox.Enabled = Me.YourCheckBox
Me.YourTextbox.Locked = Not Me.YourCheckbox

Of course, if the user checks and then UNchecks the checkbox, do you want to clear the text? If so, then you'd have to add an If statement to the Click event:

If Me.MyCheckbox = False Then
  Me.YourTextbox = ""
End If
GPSPOWAuthor Commented:

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.