Report formatting

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

Guest

I'm trying to bold the word "amount" on the trimmed example I have below. Can
somebody tell me how do I do it? I just want to bold one word in the whole
trimmed example I have.


=Trim("The amount of the loan is " & [origloanbal] & " of a period of ")
 
I'm trying to bold the word "amount" on the trimmed example I have below. Can
somebody tell me how do I do it? I just want to bold one word in the whole
trimmed example I have.

=Trim("The amount of the loan is " & [origloanbal] & " of a period of ")

You can't have multiple formats in a regular Access control.
You can simply use 3 controls where you are now attempting to use 1.

regular font BOLD regular font
=["The "] [="Amount"] [[=" of the loan is" & etc.]

I'm sure you can position the bold control exactly spaced between the
other controls so that it looks as if it were one complete sentence.
 
I'm sure you could do this another way but this is a way I did the
samething



Dim space_text As string
Dim space_text1 As string
Dim n_text As string
Dim n1_text as string
Dim bold_text as string
Dim b_text_len As Integer
Dim Dim n_text_len As Integer
Dim i As Integer

i=0

' NEW BOLD TEXT CONVERSION CODE
' IF NEEDED YOU COULD SEARCH ONE LONG FIELD FOR THE BOLD SECTION YOU
NEED AND PARSE IT OUT
' TO THE THREE VALUES BELOW
bold_text= "Amount"
n_text = "" 'Your first section of non-bold text
n1_text= "" 'Your second section of non bold text

n_text_len = Len(BOLD_TEXT.Value)

'THIS SECTION COUNTS THE NUMBER OF SPACE TO THE BOLD TEXT
Do While i < n_text_len
space_text = space_text & " "
i = i + 1
Loop

i=0
b_text_len = Len(BOLD_TEXT.Value)

'THIS SECTION COUNTS THE NUMBER OF SPACE TO THE BOLD TEXT
Do While i < b_text_len
space_text1 = space_text1 & " "
i = i + 1
Loop


'PLACE THREE TEXT CONTOLS THAT ARE A FIXED WIDTH FONT ON TOP EACH OTHER
text1.value=n_text
Text2.Value = space_text & b_text
text3.value= space_text & space_tect2 & n1_text
 
Fred:

For instance if I want to format an amount in currency on a report, this is
how I do it:

=trim("The amount of "& format([dollaramount], "currency")& "dues tomorrow")

I was wondering if there is a code to format the text bold, underlined,
italics, etc. Do you have any idea?



fredg said:
I'm trying to bold the word "amount" on the trimmed example I have below. Can
somebody tell me how do I do it? I just want to bold one word in the whole
trimmed example I have.

=Trim("The amount of the loan is " & [origloanbal] & " of a period of ")

You can't have multiple formats in a regular Access control.
You can simply use 3 controls where you are now attempting to use 1.

regular font BOLD regular font
=["The "] [="Amount"] [[=" of the loan is" & etc.]

I'm sure you can position the bold control exactly spaced between the
other controls so that it looks as if it were one complete sentence.
 
Are you asking if it can be used on a report or for permission to use
it?
Either way, Yes it can be used on your report and yes your welcome to
it.

Please check the code, it looks like I type'od some of it.

2 Dims on one line
Last line should be space_text2 not spacetect2
 
Kew:

How I will use the code? That's it, where the code goes on my report? in a
text box, or where? Can you tell me because I don't have a clue.

Thanks
 
When you bring up the report in design mode click on the word detail.
This should hilite the the detail bar across your report. Then right
mouse click, you should see a list of options, the top one should be
<Build Event...>, click this one. You then have options of what
builder you want to use, pick <CODE BUILDER>
this brings up a module that you can put the code in.

Since this is in the detail section of the report every row that is
returned with the qry will run through this section of code.
 
Back
Top