Multiple formats within 1 control on a report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I posted a question days ago regarding my desire to have some of the contents
of a text box in bold and other parts not bold. Marshall Barton was kind
enough to direct me to www.lebans.com (a wealth of goodies for anyone saavy
enough to know how to implement them).

In the Table of Contents there is a sample DB
TOC\Reports\MixBold-Plain\Lady.zip that comes close but it only works on
content that doesn't exceed 1 line in the report text box. I need something
that will work on multiple lines within the text box on the report.

For example:
On a form there are two text boxes the contents of which will have varying
lengths(tbA and tbB). On the report, I have tbC. I would like to see the
complete contents of tbA&B in tbC with tbA in bold and tbB not Bold.

Please help
 
Why not have two textboxes on your report; you can even overlap them. Put
TbA in the top textbox and bold it. Put TbB in the bottom textbox and leave
it not bold.
 
Greg said:
I posted a question days ago regarding my desire to have some of the contents
of a text box in bold and other parts not bold. Marshall Barton was kind
enough to direct me to www.lebans.com (a wealth of goodies for anyone saavy
enough to know how to implement them).

In the Table of Contents there is a sample DB
TOC\Reports\MixBold-Plain\Lady.zip that comes close but it only works on
content that doesn't exceed 1 line in the report text box. I need something
that will work on multiple lines within the text box on the report.

For example:
On a form there are two text boxes the contents of which will have varying
lengths(tbA and tbB). On the report, I have tbC. I would like to see the
complete contents of tbA&B in tbC with tbA in bold and tbB not Bold.


Hi Greg,

I thought I was directing you to Stephen's RTF control.
This may take a lot more effort to get what you want, but
AFAIK, it's the only way to mix different properties on
various parts of a string.
 
Thanks for your response........

I believe your solution won't work because the contents of the bolded and
unbolded text boxes will be different so you can't just superimpose them. In
some cases, it may be only 2 words that need to be in bold and in other cases
an entire paragraph.

Does this make sense?

Thanks again....any insight is greatly appreciated.....
 
Try the following:
Put two textboxes on your report, one above the other, and don't overlap
them. Do not place any controls to the left or right of the top textbox. Set
the top textbox's Can Grow property to Yes and make it bold. Set the control
source for the top textbox to TbA and the control source for the bottom
textbox to TbB. Try your report.

Steve
PC Datasheet
 
You would have to use a Rich Text ActiveX control.
The data would have to be either:

1) Formatted and stored in the Memo field as RTF text
or
2) At runtime programmatically format the desired text

#1 is easy but tedious.
#2 requries some, but not much, coding skills.

--

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

First let me say thanks for contributing to this post. Perhaps I have
bitten off more than I can chew but I believe Access can do what I need
done.......I have reviewed the RTF function and it is a great feature and I
will definately use it in certain parts of this project.

Let me clarify my earlier post by explaining my project.

I am attempting to create a letter generating database for a medical group.
It will require the user to select a 'healthplan' and 'letter reason'. In
some cases based on the reason for the letter, certain additional information
may be necessary which will be entered into a text box by the user.

These reasons and additional text box values need to be concatenated. As of
yet, I have found no way to concatenate the RTF value of a control with the
contents of either another RTF control or a separate text box on a form.
Ideally, embedded text boxes and/or RTF controls in an RTF control would
work...I think

Am I missing something?

Thanks in advance for your thoughts....

Also, perhaps there is a way to do this programatically at run time but I
can't find a solution that will concatenate text box content and allow for
both bold/no bold in the same paragraph......

Greg
 
Back
Top