bolding words in Access Report (html tags?)

C

Chris

Hello, I need to bold specific words in a field in an
Access report. The text is stored in an SQL database and
linked to Access. I can have the words marked in SQL
using html tags (<b>boldword</b>). What I would like to
do is use vb to convert these words (which are randomly
dispersed throught the records) in the report to display
as bold. The vb would need to find the tagged words,and
then bold only the tagged word(s) in the report.
I have played with Lebahn's example of bolding the last
name in a field, but can't seem to get it to work with
this scenario. Any thoughts? Client says this is a
showstopper.. :-( Many thanks in advance.
 
R

Rick Brandt

Chris said:
Hello, I need to bold specific words in a field in an
Access report. The text is stored in an SQL database and
linked to Access. I can have the words marked in SQL
using html tags (<b>boldword</b>). What I would like to
do is use vb to convert these words (which are randomly
dispersed throught the records) in the report to display
as bold. The vb would need to find the tagged words,and
then bold only the tagged word(s) in the report.
I have played with Lebahn's example of bolding the last
name in a field, but can't seem to get it to work with
this scenario. Any thoughts? Client says this is a
showstopper.. :-( Many thanks in advance.

Unless you are using an RTF ActiveX control you cannot apply bold (or any
other formatting) to only a portion of the text in the control. You either
have to use an RTF control or use the print method available in reports.
That allows you to place text on the report through code without using
controls at all.
 
S

Stephen Lebans

If you require a multiline solution then you would have to use an RTF
control and programmatically manipulate the incoming text to convert the
HTML tags to their equivalent RTF control codes.

Another solution would be to copy the incoming HTML formated text to the
Clipboard and then ask the CLipboard to convert this to RTF. It works as
long as the incoming data's formatting characteristics are directly
supported by RTF. You would then copy the RTF from the Clipboard into an
RTF ActiveX control.

The solution you are looking at on my site is really a single line
solution.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 

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