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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting in formula

Status
Not open for further replies.

shelby55

Technical User
Jun 27, 2003
1,229
CA
Hi

I'm using CR9 with Windows XP/SP2 on an Access database.

Is there any way to format a portion of the field within the formula. For instance, my formula is:

ToText(Sum ({@Babies}),0)+" babies were born at Sunshine Hospital. "+ToText(Sum ({@AllBabies}),0)+
" babies were born at all sites in the region."

I did this so that I didn't have to worry about spacing no matter the sum results. What I want to do is have the two sums be bold but the rest of the sentence left unbolded. Is it possible?

Thanks.

Shelby
 
You could drop a bolded inserted sum into a text box,add the text with spaces where appropriate and then add the remaining text, etc. You can format individual elements with different styles.

Or you could format within a formula by using:

"<b>"+ToText(Sum ({@Babies}),0)+"</b>"+" babies were born at Sunshine Hospital. "+"<b"+ToText(Sum ({@AllBabies}),0)+"</b>"+" babies were born at all sites in the region."

Then go to format field->paragraph formatting->text interpretation: HTML. This will change the font size a bit also, so you might need to add tags for font size like, e.g.,:

"<font size = 2>"+"text"+"</font size>"

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top