Make a label visible

G

Guest

I have a control on a form. The name of the control is STATUS.
If the data in STATUS shows to be “Inactive†I would like a label to be
visible.
The name of the label in question is lblInactive.
I would like lblInactive to read “This is an inactive file.â€
Otherwise, I would like for the label named lblInactive to not be invisible.
 
F

fredg

I have a control on a form. The name of the control is STATUS.
If the data in STATUS shows to be ´Inactive¡ I would like a label to be
visible.
The name of the label in question is lblInactive.
I would like lblInactive to read ´This is an inactive file.¡
Otherwise, I would like for the label named lblInactive to not be invisible.


Set the label's Caption to
´This is an inactive file.¡
without the quotes.

Code the Status AfterUpdate event:
Me![lblInactive].Visible = Me![Status] = "Inactive"

Place the same code in the form's Current event.
 
G

Guest

Assuming this is a single form.
In the On current event of the form put
If me.STATUS ="Inactive" then
me.lblInactive = "This is an inactive file."
me.lblInactive.visible = true
else
me.lblInactive.visible = false
end if
 
G

Guest

Chris
I took out
-- me.lblInactive = "This is an inactive file."
and it works just fine.

Thanks so much.
Jerry Wright
 

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