Bold some text within a text box

L

.Len B

I have a text box hosting a memo field.

I have had a user request for the ability to bold some words within the
text box.

I suspect it is not possible within a text box but is there a way to do
it?

Or will it require a custom control? If it requires a custom control,
what would be involved in changing over? Presumably existing text will
automatically come in unformatted but are there any other things to
consider?
 
A

Allen Browne

It is possible only in Access 2007.

In table design view, set the memo field's properties so it accepts rich
text.

If you are using an earlier version of Access, you would need to download a
special control to format some text differently than the rest:
http://www.lebans.com/richtext.htm
 
L

.Len B

Hi Allen,
Version is 2k3.
Thanks for the lebans link.

There appears to be two versions both dated May 2004 -
1.8 production release
2.0 beta

Do you think/know if the beta is stable? It's surely old enough.

I assume the control is suitable for reports too else how do you print
it.

Do you have a rough idea of the time that would be involved in the
changeover? One control on one form and one on a report. I'm trying to
give the job a priority before I dive right in.

Thanks
--
Len
______________________________________________________
remove nothing for valid email address.
| It is possible only in Access 2007.
|
| In table design view, set the memo field's properties so it accepts
rich
| text.
|
| If you are using an earlier version of Access, you would need to
download a
| special control to format some text differently than the rest:
| http://www.lebans.com/richtext.htm
|
| --
| Allen Browne - Microsoft MVP. Perth, Western Australia
|
| Reply to group, rather than allenbrowne at mvps dot org.
|
|
| | > I have a text box hosting a memo field.
| >
| > I have had a user request for the ability to bold some words within
the
| > text box.
| >
| > I suspect it is not possible within a text box but is there a way to
do
| > it?
| >
| > Or will it require a custom control? If it requires a custom control,
| > what would be involved in changing over? Presumably existing text
will
| > automatically come in unformatted but are there any other things to
| > consider?
|
 
A

Allen Browne

You'll need to try these for yourself. Stephen is a true wizard, so his
stuff is good, but he's not really maintaining it any more, i.e. it's all
good stuff he's done in years gone by. It does work on reports as well as
forms.

Bear in mind that Stephen's Rich Text control uses rich text format (RTF),
where as the new control Microsoft calls 'rich text' in A2007 actually uses
HTML. So, if you go with Stephen's control expecting to just switch over to
the Microsoft one in the future, that won't work.
 
L

.Len B

Thanks Allen
I'm glad you mentioned the HTML distinction. I guess that converting to
A2k7 later on shouldn't be a problem just the same. I'd just continue
using RTF2 and not switch to MS's HTML one.
--
Len
______________________________________________________
remove nothing for valid email address.
| You'll need to try these for yourself. Stephen is a true wizard, so his
| stuff is good, but he's not really maintaining it any more, i.e. it's
all
| good stuff he's done in years gone by. It does work on reports as well
as
| forms.
|
| Bear in mind that Stephen's Rich Text control uses rich text format
(RTF),
| where as the new control Microsoft calls 'rich text' in A2007 actually
uses
| HTML. So, if you go with Stephen's control expecting to just switch
over to
| the Microsoft one in the future, that won't work.
|
| --
| Allen Browne - Microsoft MVP. Perth, Western Australia
|
| Reply to group, rather than allenbrowne at mvps dot org.
|
|
| | > Hi Allen,
| > Version is 2k3.
| > Thanks for the lebans link.
| >
| > There appears to be two versions both dated May 2004 -
| > 1.8 production release
| > 2.0 beta
| >
| > Do you think/know if the beta is stable? It's surely old enough.
| >
| > I assume the control is suitable for reports too else how do you
print
| > it.
| >
| > Do you have a rough idea of the time that would be involved in the
| > changeover? One control on one form and one on a report. I'm trying
to
| > give the job a priority before I dive right in.
| >
| > Thanks
| > --
| > Len
| > ______________________________________________________
| > remove nothing for valid email address.
 
R

Rick Brandt

..Len B said:
I have a text box hosting a memo field.

I have had a user request for the ability to bold some words within the
text box.

I suspect it is not possible within a text box but is there a way to do
it?

Or will it require a custom control? If it requires a custom control,
what would be involved in changing over? Presumably existing text will
automatically come in unformatted but are there any other things to
consider?

While other responses have covered the "how" I will point out that you have
to consider what this does to the stored data and possible functionality
issues. If you use an RTF control to store the phrase...

This is a test RTF entry

....and have the word "test" in bold then you will not be saving into your
field the phrase "This is a test RTF entry". You will in fact be saving
something similar to...

This is a test \b RTF \b0 entry

If a user then tries to search for the original phrase they will not find
it.

This is not as common a problem for memo fields (at least they are not
indexed nor used in joins where this would be a more critical issue), but it
is something to keep in mind. In some applications doing text-matching
against such a field could be an expectation.

In Access 2007's HTML version of "rich text" there is a function that will
return the plain text version of the data and that could be used to work
around the issue described. I don't know if there are similar functions
when using a non-native RTF control.
 
L

.Len B

Thanks for that Rick. I had expected that some sort of formatting
characters would be embedded but I didn't foresee the searching
implications.

I'll have to ask the users how likely is a requirement to search this
field.

--
Len
______________________________________________________
remove nothing for valid email address.
| .Len B wrote:
|
| > I have a text box hosting a memo field.
| >
| > I have had a user request for the ability to bold some words within
the
| > text box.
| >
| > I suspect it is not possible within a text box but is there a way to
do
| > it?
| >
| > Or will it require a custom control? If it requires a custom control,
| > what would be involved in changing over? Presumably existing text
will
| > automatically come in unformatted but are there any other things to
| > consider?
|
| While other responses have covered the "how" I will point out that you
have
| to consider what this does to the stored data and possible
functionality
| issues. If you use an RTF control to store the phrase...
|
| This is a test RTF entry
|
| ...and have the word "test" in bold then you will not be saving into
your
| field the phrase "This is a test RTF entry". You will in fact be
saving
| something similar to...
|
| This is a test \b RTF \b0 entry
|
| If a user then tries to search for the original phrase they will not
find
| it.
|
| This is not as common a problem for memo fields (at least they are not
| indexed nor used in joins where this would be a more critical issue),
but it
| is something to keep in mind. In some applications doing text-matching
| against such a field could be an expectation.
|
| In Access 2007's HTML version of "rich text" there is a function that
will
| return the plain text version of the data and that could be used to
work
| around the issue described. I don't know if there are similar
functions
| when using a non-native RTF control.
|
 
L

.Len B

Further thoughts on the issue.
Elsewhere in the app, I will need to display the data in plain text.
I googled for a routine or component to strip the rtf formatting tags.
No luck.

I'm sure there must be something somewhere.
Any suggestions on search terms to try.
Or does anyone have a solution?

I guess it's one more argument in favour of changing to 2007.

--
Len
______________________________________________________
remove nothing for valid email address.
| .Len B wrote:
|
| > I have a text box hosting a memo field.
| >
| > I have had a user request for the ability to bold some words within
the
| > text box.
| >
| > I suspect it is not possible within a text box but is there a way to
do
| > it?
| >
| > Or will it require a custom control? If it requires a custom control,
| > what would be involved in changing over? Presumably existing text
will
| > automatically come in unformatted but are there any other things to
| > consider?
|
| While other responses have covered the "how" I will point out that you
have
| to consider what this does to the stored data and possible
functionality
| issues. If you use an RTF control to store the phrase...
|
| This is a test RTF entry
|
| ...and have the word "test" in bold then you will not be saving into
your
| field the phrase "This is a test RTF entry". You will in fact be
saving
| something similar to...
|
| This is a test \b RTF \b0 entry
|
| If a user then tries to search for the original phrase they will not
find
| it.
|
| This is not as common a problem for memo fields (at least they are not
| indexed nor used in joins where this would be a more critical issue),
but it
| is something to keep in mind. In some applications doing text-matching
| against such a field could be an expectation.
|
| In Access 2007's HTML version of "rich text" there is a function that
will
| return the plain text version of the data and that could be used to
work
| around the issue described. I don't know if there are similar
functions
| when using a non-native RTF control.
|
 

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

Similar Threads


Top