hello guys.
i saw a function that hides a text box till you click on the option button.
i would like to hide a text box till you un-tick the check box.
can it be done that way?
thanks![]()
hello guys.
i saw a function that hides a text box till you click on the option button.
i would like to hide a text box till you un-tick the check box.
can it be done that way?
thanks![]()
Use the Click event of the CheckBox and the Visible property of the TextBox.
can you help me more with that, i tried puting that on click but i dosn't work.
i want the text box of another field to remain hiden until i remove the tick from the box.
What did you put in the Click event of the CheckBox? Post it here.
ok...i got it to work partially
it hides the text box when i tick the box but it won't show it again when i un-tick the box
here is what i did On Click:
Private Sub Active_Click()
Label409.Visible = False
Leave_Date.Visible = False
End Sub
i also added the db that i saw that option.
I use the Me. reference so that IntelliSense can help with the spelling. If Label409 is attached to the Leave_Date control then its visibility will follow the other control. Change your code to something like:
You are also going to want similar code in the Current Event of the form.Code:Private Sub Active_Click() If Active Then Leave_Date.Visible = True Else Leave_Date.Visible = False End If End Sub
its working but i still have a problem that that field remais visible till you click on the tick box.
maybe a need to do that on the form like you said.
i can just add the same code on the form or i need to change it??
Same code in the Current event of the form.
i am using Tabs on my form...i don't see the current form. can you help me on that?
ok i got on current on the form..but it give me a debug error when it gets on the blank last record. Run-Time error '94: Invalid use of Null
Private Sub Form_Current()
If Active Then
Leave_Date.Visible = False
Else
Leave_Date.Visible = True
End If
End Sub
Then wrap the code in:
If Not Me.NewRecord Then
'current code
End If
Post how you wrapped the code in the test.
Backwards:
You need to use the code tags so your indenting is preserved. You also missed an End If in the code.Code:Private Sub Form_Current() If Not Me.NewRecord Then If Active Then Leave_Date.Visible = False Else Leave_Date.Visible = True End If End If End Sub
thanks for all the hepl mate it work perfectly.![]()