Click to See Complete Forum and Search --> : Making a text box visible


zoom14151
September 23rd, 1999, 07:12 PM
I'm attempting a program and want to know if there is a way to make a text box only visible when a check box is checked and invisible when not checked. Would it be the same as enabling a command button.

santulan
September 23rd, 1999, 09:09 PM
Hi...
At the time of loading you make text box invisible by setting

text1.visible = false



you can also do so by property setting.
In the check box click event if the value is 1 then make the textbox visible otherwise make it invisible

if check1.value = 1 then
text1.visible = true
end if
if check1.value = 0 then
text1.visible = false
end if



Please try this out.



Santulan

November 12th, 1999, 06:18 PM
A simpler way is

Sub Check1_Click()
' Display text1 if the box is checked
Text1.Visible = Check1.Value
End Sub