Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hightlight found text from search

Status
Not open for further replies.

clanm

Programmer
Dec 26, 2005
237
US
Let's say I have a query that's performed by the user entering a string value, which completes the where condition.

Is there a way to highlight in the string that comes back where that parameter exists?

So, if the user types in yellow, I want to highlight the word yellow in the following sentence that would come back on the report:

The sun is a bright <bold>yellow</bold> today!

Thanks!
 
Yes, actually, there is, but it's a little bulky. I would recommend creating a Rectangle and putting three text boxes butt up against each other. Enter the first part of your string in the first box and the last part of the string in the last box and then the parameter value in the middle box. Then change the COLOR property of the middle box to the color you want. You can also use the LOCATION properties and the PADDING properties to properly make your textboxes look like this is all one sentence.

If you don't want to do the above, you might fiddle with the following. I don't know how well it'll work.

I changed my page number colors depending on what page of the report I was on. In the COLOR Property of text box, choose Expression and then enter something like =iif( Globals!PageNumber > 1, "Silver", "MediumBlue").



Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top