Keep Background Style in a Field From Changing When It Is Clicked

A

Amy E. Baggott

I have two fields on my form that act as links. One is a conditionally
formatted link to another form which is bold and red if there is anything to
look at on that form and blue otherwise to alert the user if they need to go
there. The other is a hyperlink to a PDF file. I have them both set with
transparent backgrounds. However, when you click on either of them, the
background turns white and stays that way until you click something else. I
would like it to act more like a label in that it would stay transparent when
someone clicks on it. I realize it makes no difference to the functionality
of the form -- it just looks nicer.
 
D

Damon Heron

Make your textbox.visible= False. Place a label over it, and set
label.caption to value of textbox. In click event of label, perform event
action.


Damon
 
A

Amy E. Baggott

The only problem with that is that you can't conditionally format a label.
In one case, I used a field rather than a label specifically so that I could
use conditional formatting. If there is data in a particular field, I want
the text to be bold and red so that it alerts the user that they need to
check that information.
--
Amy E. Baggott

"I''m going crazy and I''m taking all of you with me!" -- Linda Grayson


Damon Heron said:
Make your textbox.visible= False. Place a label over it, and set
label.caption to value of textbox. In click event of label, perform event
action.


Damon
 
D

Damon Heron

that's true, but you can use code in the current event, or open event, of
the form to set the labels's properties forecolor, fontbold, to anything you
want.

if [your conditions are met] then
me.label1.forecolor= vbred
me.label1.fontbold= true
else
me.label1.forecolor= vbblack
me.label1.fontbold= false
end if



Amy E. Baggott said:
The only problem with that is that you can't conditionally format a label.
In one case, I used a field rather than a label specifically so that I
could
use conditional formatting. If there is data in a particular field, I
want
the text to be bold and red so that it alerts the user that they need to
check that information.
 

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