shade

  • Thread starter Thread starter supernova
  • Start date Start date
S

supernova

Hi,

I want to recreate a textbox in a report which bind to a table
field and want the textbox to be shaded or background darker colour when a
table field value is matched. How can I set write the code or which
attribute I can use? Thanks.
 
Hi,


Add a second text control, exactly the same size and the same font and
the same control source than the one to be shaded, but behind the control
being shades (z-order), and a little bit offset down and to the right. Use
the appropriate foreground color, that will be the color of the shadow. Turn
that extra control visibility to true, or false, appropriately, in the
onFormat event:


Me.ExtraControl.Visible = criteriaHere


Hoping it may help,
Vanderghast, Access MVP
 
I Access 2000 and > there is Conditional Formatting located
on the Format/Conditional formatting

Jim
 
Or, locate the second text control well away from the first one, so you can
easily select either control, when you are changing the form. Then have the
form's Open or Load event move the second control exactly over the first
one, at runtime, when the form opens:

with me![txt2]
.left = me![txt1].left
' ditto .top, .height, .width
end with

This also means tht you do have to be sure, that the second control is
exactly the same size as the first one. The code above will do that for you,
at run time.

HTH,
TC
 
Thanks for the advice. Just wonder if there is a way I can just set up the
background color of a control with some coding condition.
 
See the BackStyle & BackColor properties (or somesuch: I don't have Access
here to check the names).

HTH,
TC
 
Back
Top