By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,581 Members | 1,966 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,581 IT Pros & Developers. It's quick & easy.

Report Rich Text Box if field < 0 then font color change

P: 2
I have a report with a rich text box - see sample below;

="For Work performed Contractor has been paid " & "<u><b>" & Format([PaidtoDate],"Currency") & "</u></b> " & " (“Payment”) and " & "<u><b>" & Format([Outstanding],"Currency") & "</u></b> " & " remains (including taxes and freight) to be paid under the terms of the Agreement for work to be performed."

If the [Outstanding] field is less than 0 I want the font color to be red otherwise black, bold and underlined as noted.
3 Weeks Ago #1
Share this Question
Share on Google+
3 Replies


100+
P: 178
Have you tried using conditional Formatting?
3 Weeks Ago #2

P: 2
I tried conditional formatting and it changes everything within the rich text box to red
3 Weeks Ago #3

NeoPa
Expert Mod 15k+
P: 31,561
Evola1327:
I tried conditional formatting and it changes everything within the rich text box to red
According to your original question that's what you were after.

If the only part you want to be red is the currency value part of the whole value then you may try something that includes the RTF code for red in your Format() call :
Expand|Select|Wrap|Line Numbers
  1. ... & Format([Outstanding],IIf([Outstanding]<0,'<color=red>Currency</color>','Currency')) & ...
I'm afraid I wouldn't know how to set a colour within RTF but the concept's there.
3 Weeks Ago #4

Post your reply

Sign in to post your reply or Sign up for a free account.