Formatting text within Expressin Builder on a Report

S

silva

I'm building a report, but the information displayed on part of it is rather
complicated to display. I understand how to get Expression Builder to display
everything I need, except for text formatting. Because the information being
displayed varies based upon values of a couple specific fields, I can't use
labels on part of the report. I'd like to be able to bold, italicize, or
underline text within Expression Builder to simulate labels, but I am
uncertain of how this works. I noticed that in the "Help" it said that user
defined formats could be used, but I couldn't find anything on how to make
one.

For example, this is what I'm trying to do:

IIf([field1] = condition, "bold formatted text set 1" & [field2] & "text" &
[field3], "bold formatted text set 2" & [field4])

As I attempted to demonstrate, the formatted text would be different
depending on the result of the comparison, making the use of static labels
rather cumbersome. I was intending on having multiple textfields scripted
like this, set to be able to be resized, displaying different, but related,
griup of record data.

If anyone could tell me how to do this formatting, it would be greatly
appreciated.
 
D

Douglas J. Steele

What version of Access?

In Access 2007, you can use HTML (although I believe it's referred to as RTF
in Access).

Prior to Access 2007, you have no choice but to use an RTF control. Stephen
Lebans has a free one available at http://www.lebans.com/richtext.htm

I don't believe in either case, though, that you'll be able to use the
Expression Builder to display everything you need.
 
S

silva

I'm using Access 2003. As far as displaying everything I need, I know I can.
What I'm doing I've done before and it worked exactly as I intended, but I
didn't need to do any formatting within Expression Builder. So I need an RTF
control to bold etc. text within Expression Builder? Would installing
something like that require administrative access?

Douglas J. Steele said:
What version of Access?

In Access 2007, you can use HTML (although I believe it's referred to as RTF
in Access).

Prior to Access 2007, you have no choice but to use an RTF control. Stephen
Lebans has a free one available at http://www.lebans.com/richtext.htm

I don't believe in either case, though, that you'll be able to use the
Expression Builder to display everything you need.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


silva said:
I'm building a report, but the information displayed on part of it is
rather
complicated to display. I understand how to get Expression Builder to
display
everything I need, except for text formatting. Because the information
being
displayed varies based upon values of a couple specific fields, I can't
use
labels on part of the report. I'd like to be able to bold, italicize, or
underline text within Expression Builder to simulate labels, but I am
uncertain of how this works. I noticed that in the "Help" it said that
user
defined formats could be used, but I couldn't find anything on how to make
one.

For example, this is what I'm trying to do:

IIf([field1] = condition, "bold formatted text set 1" & [field2] & "text"
&
[field3], "bold formatted text set 2" & [field4])

As I attempted to demonstrate, the formatted text would be different
depending on the result of the comparison, making the use of static labels
rather cumbersome. I was intending on having multiple textfields scripted
like this, set to be able to be resized, displaying different, but
related,
griup of record data.

If anyone could tell me how to do this formatting, it would be greatly
appreciated.
 
B

boblarson

You can't do this in an expression builder the way you are trying. As noted
you can only format in an RTF textbox but I don't know that you can actually
set a control source with formatting. You would need to probably use VBA to
set the parts of the RTF box, although it may be possible to use HTML within
the builder, but I've not seen that done.
--
Bob Larson
Access World Forums Administrator

Tutorials at http://www.btabdevelopment.com

__________________________________


silva said:
I'm using Access 2003. As far as displaying everything I need, I know I can.
What I'm doing I've done before and it worked exactly as I intended, but I
didn't need to do any formatting within Expression Builder. So I need an RTF
control to bold etc. text within Expression Builder? Would installing
something like that require administrative access?

Douglas J. Steele said:
What version of Access?

In Access 2007, you can use HTML (although I believe it's referred to as RTF
in Access).

Prior to Access 2007, you have no choice but to use an RTF control. Stephen
Lebans has a free one available at http://www.lebans.com/richtext.htm

I don't believe in either case, though, that you'll be able to use the
Expression Builder to display everything you need.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


silva said:
I'm building a report, but the information displayed on part of it is
rather
complicated to display. I understand how to get Expression Builder to
display
everything I need, except for text formatting. Because the information
being
displayed varies based upon values of a couple specific fields, I can't
use
labels on part of the report. I'd like to be able to bold, italicize, or
underline text within Expression Builder to simulate labels, but I am
uncertain of how this works. I noticed that in the "Help" it said that
user
defined formats could be used, but I couldn't find anything on how to make
one.

For example, this is what I'm trying to do:

IIf([field1] = condition, "bold formatted text set 1" & [field2] & "text"
&
[field3], "bold formatted text set 2" & [field4])

As I attempted to demonstrate, the formatted text would be different
depending on the result of the comparison, making the use of static labels
rather cumbersome. I was intending on having multiple textfields scripted
like this, set to be able to be resized, displaying different, but
related,
griup of record data.

If anyone could tell me how to do this formatting, it would be greatly
appreciated.
 
S

silva

Ok, that's what I was afraid of. Oh well, I'll live. I was just hoping that
this was possible in a report so I could break up the data and make it easier
to distinguish. I suppose as long as the data output works it doesn't really
matter all that much (and it does work). Thanks anyway, guys.

boblarson said:
You can't do this in an expression builder the way you are trying. As noted
you can only format in an RTF textbox but I don't know that you can actually
set a control source with formatting. You would need to probably use VBA to
set the parts of the RTF box, although it may be possible to use HTML within
the builder, but I've not seen that done.
--
Bob Larson
Access World Forums Administrator

Tutorials at http://www.btabdevelopment.com

__________________________________


silva said:
I'm using Access 2003. As far as displaying everything I need, I know I can.
What I'm doing I've done before and it worked exactly as I intended, but I
didn't need to do any formatting within Expression Builder. So I need an RTF
control to bold etc. text within Expression Builder? Would installing
something like that require administrative access?

Douglas J. Steele said:
What version of Access?

In Access 2007, you can use HTML (although I believe it's referred to as RTF
in Access).

Prior to Access 2007, you have no choice but to use an RTF control. Stephen
Lebans has a free one available at http://www.lebans.com/richtext.htm

I don't believe in either case, though, that you'll be able to use the
Expression Builder to display everything you need.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I'm building a report, but the information displayed on part of it is
rather
complicated to display. I understand how to get Expression Builder to
display
everything I need, except for text formatting. Because the information
being
displayed varies based upon values of a couple specific fields, I can't
use
labels on part of the report. I'd like to be able to bold, italicize, or
underline text within Expression Builder to simulate labels, but I am
uncertain of how this works. I noticed that in the "Help" it said that
user
defined formats could be used, but I couldn't find anything on how to make
one.

For example, this is what I'm trying to do:

IIf([field1] = condition, "bold formatted text set 1" & [field2] & "text"
&
[field3], "bold formatted text set 2" & [field4])

As I attempted to demonstrate, the formatted text would be different
depending on the result of the comparison, making the use of static labels
rather cumbersome. I was intending on having multiple textfields scripted
like this, set to be able to be resized, displaying different, but
related,
griup of record data.

If anyone could tell me how to do this formatting, it would be greatly
appreciated.
 

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