Highlight key words

jereece

Registered User.
Local time
Today, 22:42
Joined
Dec 11, 2001
Messages
300
I have a form which displays data from a local database. Is there a way I can have key words in the form field highlighted or text colored? For example, the field name is "Description". I would like for certain words to be highlighted in that field such as Safety, Accident, Spill, Leak, Chemical, etc. I import this data from a problem tracking database and look for specific issues to follow-up on. It would help if I could have my database automatically highlight key words that I am looking for.

Thanks for the help......

Jim
 
Try something like this if it's a bound field

Private Sub Form_Current()
If Me!RACFID = "KEYWORD" Then
Me!lblRACFID.BackColor = 255 'RED
Me!RACFID.BackColor = 255
Else
Me!lblRACFID.BackColor = 16777215 'WHITE
Me!RACFID.BackColor = 16777215
End If
End Sub

RACFID was a bound text field
lblRACFID was its label

You can change the forecolor, backstyle, bordercolor, .... Just be sure you include the Else stmt to swing back to the original formats
 
Unless you are using a rich text control you can't highlight certain parts. A textbox only supports a single set of properties and so there is no way to assign a different property to any given word.
 

Users who are viewing this thread

Back
Top Bottom