Check Boxes and Text Boxes

wop0703

Registered User.
Local time
Today, 03:16
Joined
Jun 1, 2005
Messages
77
I have a form with a check box among other itmes. What I want to happen is, when the user checks the check box, I want the text box to the right of it to be made visible and to let the user write text. But I only want this text box to be visible when the check box is checked. The check box is if the user wish to put a comment in the form, he will click the check box and then I want my text box to appear so that he may write the comment in the text box. Please help with this. Thanks
 
Set the properties of the text box to Visible NO and the code below will work. If you write an onload event for your form that set the Visible NO for the textbox, it will work as well. Make sure to rename mychkbox and myTextBox to the actual names of your controls.

Sub mychkBox_onclick()
If mychkBox.value = True Then
myTextBox.visible = True
Else
myTextBox.visible = False
End Sub
 
check boxes and text boxes

Your code for making a text field visible when the check box is true works OK. The problem I have is that the text field for that check box is still visible when I go to the next record even if the check box in the next record is not checked. How can I fix this?
 
You need to reset your initial setup for the text box and check box by using the ON CURRENT event.
 

Users who are viewing this thread

Back
Top Bottom