473,387 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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.
Nov 19 '19 #1
3 1924
DJRhino1175
221 128KB
Have you tried using conditional Formatting?
Nov 19 '19 #2
I tried conditional formatting and it changes everything within the rich text box to red
Nov 19 '19 #3
NeoPa
32,556 Expert Mod 16PB
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.
Nov 20 '19 #4

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

Similar topics

3
by: Alfredo Agosti | last post by:
Hi folks, I have an Access 2000 db with a memo field. Into the memo field I put text with bold attributes, URL etc etc What I need to to is converting the rich text contained into the memo...
3
by: Christoph | last post by:
Does anyone have any recommendations on a good (or, at least decent) and ideally free rich text field control written in javascript? We've been using the one that came with Micro- soft's...
1
by: PC User | last post by:
I found this Rich Text Editor and I've been trying to recreate it in my own application. I've had trouble with the COMCTL.ImageListCtrl and the COMCTL.Toolbar to recreate the toolbar. And I've...
4
by: pbreah | last post by:
I'm doing a Rich Text Editor (WYSIWYG) in javascript for a game for kids. I'm doing a special case in with every keystroke from A-Z creates a background and foreground color for that letter, witch...
0
by: musawer | last post by:
Can Someone give a good link for C# Winform DataGrid Text Style Formating (Font,Color,Size etc)... Quick reply will be highly appreciated... Thanks...
9
by: Neil | last post by:
I need to implement a rich text box in an MDB file for a user base that consists of Access 2000 and Access 2002. Unfortunately, I'm using Access 2003 on my development machine. My understanding is...
5
by: ARC | last post by:
Just found out something interesting with Access 2007... In table design, if you set a memo field to the new rich text option, and put that control on a form, set the control to rich text, you can...
0
by: qfchen | last post by:
How should I set different font, size for each text word in the same rich-text-box window? thanks
6
TheSmileyCoder
by: TheSmileyCoder | last post by:
I need to create a table, where one of the memo fields shall be a Rich Text field. Can anyone help me with that? This is the code I currently have. Public Sub createConTable() 'Create the table...
1
by: sangeethavijay | last post by:
Hi to all, I have a XML menu. In submenu I need a partial text to be in red color. My code follows <menu name="ENRBEnergyEfficiency_tab" text="Energy Efficiency"> . . .
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.