Wednesday, March 7, 2012

Change the color on a piece of text

Below is the pice of code that I use to produce results that look like this

[4] [5] [1]

what I would like to do is is make it look like this:

[4] [5] [1]

Basically anything that >3 = Green

= "[" & CStr(Count(IIf (Trim(Fields!NOB_Pickup_L_D_T.Value) = "Y", 1, Nothing))) &

"] [" & CStr(Count(IIf (Trim(Fields!NOB_Pickup_L_D_T.Value) = "N", 1, Nothing))) &

"] [" & CStr(Count(IIf (Trim(Fields!NOB_Pickup_L_D_T.Value) = "NA", 1, Nothing)))& "]"

Thanks,

Rick

Is that output text all within the same textbox? If so, you can't change the colour of just part of it, you have to change the colour of all the text within the textbox.

|||

Yes the result is in one text box. Yes, I do know how to change all the text via an expression. But I just wanted to change a piece as shown in the example

Thanks!

|||

That was what i said in my reply: you *cannot* change only a subset of the text in a textbox. To achieve what you want, you will have to have multiple textboxes to make up your string and change the text in the appropriate one.

No comments:

Post a Comment