show search results in different colors

M

mushroom

My customer will search for some keywords with wildcards (? and *). The records can be obtained by using "SELECT * FROM ... WHERE ... LIKE ...;

Now I need to show the records in a form (Single Form View) with the keywords in a different color. I can not use Conditional Formatting since I need to highlight only some words in a record, but not the entire record. I try to use RichTextBox (ActiveX control) for this purpose. My problems are

1. how to locate the keywords with wildcards in a record? In other words, is there any method functions similarly to "LIKE"

2. The RichTextBox is bound to a string field of the records. Although i can set the color of some selected text in an unbound RichTextBox, I failed to set the color for texts in a bound RichTextBox

Whether the above tasks can be achieved or not? If yes, how?
 

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