Keyword Search

  • Thread starter Thread starter tendoy5
  • Start date Start date
T

tendoy5

I am using "Like" for a keyword search. is there a way to highlight or bold
the keyword whenever it appears in the results?
 
What version of Access are you using and where are your search results being
displayed?
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
Unfortunately, I don't have that version so am not familiar with any new
features it has. If you are displaying a bunch of text in a report control
and want to bold just certain parts of the text, as far as I know, there is
no way. You can only bold the contents of an entire control not parts of a
control.
What you could do is to have another control underneath that one and print
something like asterisks underneath where the text is.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
I imagine it could be done with a rich text control and the replace function
if you were not looking for values with wild cards in the middle of the criteria.

For example
Like "*Abyss*"
But not
Like "*A[bcd]yss*"

You would need to know the coding that is used in the rich text control to
bold something.

You can perhaps use something like
Replace([MyTextField],"Abyss","<bAbyss/b>")

I can't experiment with that right now. If the control you are using is just
a text control you could use the technique to add some characters before and
after to help spot the hits.

Replace([MyTextField],"Abyss","/-/-/Abyss/-/-/")

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Back
Top