Bold Problem

V

Vensia

Dear all,

In my report, there are three text boxes: CompanyName (visible=false),
CompanyAddress (visible=false), and txtCompany (visible=true).
The third text box will contain :
Me!txtCompany = Me!CompanyName & vbCrLf & Me!CompanyAddress

But I want only the font of Company Name is bold. Is it possible ?
Thanks.

Vensia
 
R

Rick Brandt

Vensia said:
Dear all,

In my report, there are three text boxes: CompanyName (visible=false),
CompanyAddress (visible=false), and txtCompany (visible=true).
The third text box will contain :
Me!txtCompany = Me!CompanyName & vbCrLf & Me!CompanyAddress

But I want only the font of Company Name is bold. Is it possible ?
Thanks.

Vensia

Not with a standard Access control. You would have to use a rich text ActiveX
control or programmatically print the data using the print method in the Format
event of the section.
 
F

fredg

Dear all,

In my report, there are three text boxes: CompanyName (visible=false),
CompanyAddress (visible=false), and txtCompany (visible=true).
The third text box will contain :
Me!txtCompany = Me!CompanyName & vbCrLf & Me!CompanyAddress

But I want only the font of Company Name is bold. Is it possible ?
Thanks.

Vensia

You can't have 2 different formats in on control.

Why do you want to create one control out of the two?
Make the [CompanyName] visible (with a Bold font), and place the
[CompanyAddress] control below the name (visible with regular font),
and you have solved your problem.
 
K

kew

You can remove what you don't need.
Put two text controls on top each other and add spaces the
same number as the bold text is long.
bold_text = "BOLD"
other_text= " " & "your other text"
4 spaces at this location---^
NOTE: you must use a fixed width font


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 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_text2 & n1_text
 
V

Vensia

Why I don't create one control out of the two?

This is an invoice report.
I put the customer information at the left side and many other text controls
at the right side like invoice no, invoice date, currency, PO number, and PO
date.
Actually I want the font of customer name is bold and bigger than the
customer address.
In some cases, the Customer Name is too long and it will take 2 lines.
If I'm using one control for Customer Name dan set CanGrow=True, when the
customer name is displayed in two lines, the the other text controls at the
right side move to below.

Thanks.




fredg said:
Dear all,

In my report, there are three text boxes: CompanyName (visible=false),
CompanyAddress (visible=false), and txtCompany (visible=true).
The third text box will contain :
Me!txtCompany = Me!CompanyName & vbCrLf & Me!CompanyAddress

But I want only the font of Company Name is bold. Is it possible ?
Thanks.

Vensia

You can't have 2 different formats in on control.

Why do you want to create one control out of the two?
Make the [CompanyName] visible (with a Bold font), and place the
[CompanyAddress] control below the name (visible with regular font),
and you have solved your problem.
 
V

Vensia

I want to use Arial font and the font of Customer Name is bigger than the
Customer Address.
Is it possible using this below code?
In my previous post, I made false with the field name.
Thanks.
 
K

kew

I don't think Arial is a fixed width font and this only works if the
text sizes are the same.
 

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