Hiding/Unhiding a text box

G

Guest

I have a check box. When I click it making it True/Yes I want a label I have
set as not visible to become visible. Should be simple but isn't!
 
A

Allen Browne

Replace the label with a text box bound to an expression like this:
=IIf([MyYN], Null, "Say what")

Use your yes/no field name instead of MyYN
 
G

Guest

Thank you, I will give that a go

Allen Browne said:
Replace the label with a text box bound to an expression like this:
=IIf([MyYN], Null, "Say what")

Use your yes/no field name instead of MyYN

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Speeg said:
I have a check box. When I click it making it True/Yes I want a label I
have
set as not visible to become visible. Should be simple but isn't!
 
G

Guest

Thanks Allen it works perfectly

Allen Browne said:
Replace the label with a text box bound to an expression like this:
=IIf([MyYN], Null, "Say what")

Use your yes/no field name instead of MyYN

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Speeg said:
I have a check box. When I click it making it True/Yes I want a label I
have
set as not visible to become visible. Should be simple but isn't!
 
G

Guest

The title of the question says Text Box, but the question text says label.
Assuming you really meant label, and that you don't want the user to be able
to edit it, you can do it like

Private Sub chk_Box_Click()
Me.lbl_ImClicked.Visible = (Me.chk_Box = True)
End Sub

The visibility of the label will follow the status of the check box.


Speeg said:
Thank you, I will give that a go

Allen Browne said:
Replace the label with a text box bound to an expression like this:
=IIf([MyYN], Null, "Say what")

Use your yes/no field name instead of MyYN

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Speeg said:
I have a check box. When I click it making it True/Yes I want a label I
have
set as not visible to become visible. Should be simple but isn't!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top