Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting Numbers 1

Status
Not open for further replies.

zevw

MIS
Jul 3, 2001
697
US
I was wondering if there is a way when I format numbers on a report i.e. Format(amt, "#,###.00"). if I can also format that it should bold or reverse.

Remember it looks something like this:

Code:
="Your balance is " & Format(amt, "#,###.00") & " , please submit payment"

Thanks for your help!
 
Fonts are controlled through the properties of the control. Either do it with the Properties pop-up in design mode, or programmatically:

Code:
Me.ProspectID.FontBold = True

 
That was not the question. I know how to format a control to be bold etc.

I would like to have the amount ONLY bolded or reversed.
 
'standard' controls are all the same. RTF text boxes have the capability, but the process is somewhat arcane? an easier way for me is to abut standard text boxes and just set the property(ies) of the one.



MichaelRed


 
How are ya zevw . . .

You didn't apprise us of the [blue]criteria[/blue] for determining [blue]bold or reverse[/blue]. In any case, the following is an example.

In the [blue]On Format[/blue] event of the section containing the textbox in question, example:
Code:
[blue]   If Me.[amt] >= 0 Then
      Me![purple][B][I][TextboxName][/I][/B][/purple].FontWeight = 400 [green]'Normal[/green]
   Else
      Me![purple][B][I][TextboxName][/I][/B][/purple].FontWeight = 700 [green]'Bold[/green]
   End If[/blue]
[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
I think what he is saying is:

He understands how to bold the entire statement, but he wants only the number within his text bolded. such as:

Your balance is $3.86, please submit payment


as opposed to something like this, which he does understand:

Your balance is $3.86, please submit payment

One last thing: Sometimes I wonder; "Is that someone's signature? Or do they type that at the end of each post?
 
zevw,

Is there a reason why MichaelRed's suggestion won't work for you? Can you make a separate text control that contains only the number and format that appropriately and achieve your desired results?

Does it matter what version of access you are using? Didn't they add some more rtf support in 2007? I know in access 2007 you can have memo fields that are rtf and just format them with the formatting buttons...but I know little about it, and nothing about doing through vba on a report.



One last thing: Sometimes I wonder; "Is that someone's signature? Or do they type that at the end of each post?
 
Thanks guys for all your help, I really appreciate your time and advice.

The text box solution I am not sure if it will work for me. I never used it in Access. How will I get the value of a query or recordset result into a text box?

Secondly, How will I connect data from one table which is formatted combined with the text box.

You know, let me talk straight. I am trying to create in Access the Mail Merge idea of Word. where the user types up a standard letter stored in a Table called letters and I run a query getting the balances of all customers and inserting the amount between the 2 fields.

i.e.

Field1 in the letter table has the text. "You balance of "
Field2 in the letter table has the text. "is overdue. Please submit payment immediately"

How will I combine Field1 & [the formatted text box which will have the amount] & Field2 ?

Hope you come up with a solution, Thanks:)
 
Guys,

I am ashamed of what I wrote here yesterday, I was so tired. Looking now at what I wrote I have to laugh or maybe cry. "I never used text boxes in Access" . That is an absurd statement. But But But .... I did not understand what RTF Text Boxes and I was thinking you were talking about inserting objects into the form like inserting objects in Word. Screwed up thinking.

I WAS WONDERING WHY EVERYONE GOT SO QUIET. HA HA HA!!!

Bottom Line now that you understand what I am doing the mail merge idea. How do you get to and RTF Text BOX which I really never used. Can you please explain.

Sorry for driving you nuts, Thanks in advance.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top