Controlling a label's appearance

  • Thread starter John S. Ford, MD
  • Start date
J

John S. Ford, MD

If a control's Enabled and Locked properties are both set to no, the font of
the attached label takes on an etched appearance (and the control is greyed
out). Is there any way to get this same font effect with an UNATTACHED
label and to control it programmatically?

John
 
A

Al Campagna

John,
You can use a text control as a label, and enable or disable it as
needed.
A text control (ex. = [Label1]) with a Control Source of...
= "I look like a label:"
can be made to appear just like your other form labels, but...
Label1.Enabled = False
and
Label1.Locked = False
would cause it to "disable" in appearance.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
J

John S. Ford, MD

Dear Al,

Your technique worked perfectly except for one thing. If I make the control
(I choose a TextBox) to look like a label by setting the appropriate format
properties, all setting its Enabled property to False does is make the text
in it turn grey (not etched).

But, if I keep the control's label and make the TextBox width .001 and
height .001, it works perfectly. The control's label itself behaves the way
I want.

Thanks much!
John

Al Campagna said:
John,
You can use a text control as a label, and enable or disable it as
needed.
A text control (ex. = [Label1]) with a Control Source of...
= "I look like a label:"
can be made to appear just like your other form labels, but...
Label1.Enabled = False
and
Label1.Locked = False
would cause it to "disable" in appearance.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

John S. Ford said:
If a control's Enabled and Locked properties are both set to no, the font
of the attached label takes on an etched appearance (and the control is
greyed out). Is there any way to get this same font effect with an
UNATTACHED label and to control it programmatically?

John
 
K

Ken Snell MVP

Set Enabled to False and Locked to True. Text then will not be grayed out.

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


John S. Ford said:
Dear Al,

Your technique worked perfectly except for one thing. If I make the
control (I choose a TextBox) to look like a label by setting the
appropriate format properties, all setting its Enabled property to False
does is make the text in it turn grey (not etched).

But, if I keep the control's label and make the TextBox width .001 and
height .001, it works perfectly. The control's label itself behaves the
way I want.

Thanks much!
John

Al Campagna said:
John,
You can use a text control as a label, and enable or disable it as
needed.
A text control (ex. = [Label1]) with a Control Source of...
= "I look like a label:"
can be made to appear just like your other form labels, but...
Label1.Enabled = False
and
Label1.Locked = False
would cause it to "disable" in appearance.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your
life."

John S. Ford said:
If a control's Enabled and Locked properties are both set to no, the
font of the attached label takes on an etched appearance (and the
control is greyed out). Is there any way to get this same font effect
with an UNATTACHED label and to control it programmatically?

John
 

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