Conditional Formatting Not Working

  • Thread starter Thread starter egun
  • Start date Start date
E

egun

I have several text boxes on my main form that display numbers as currency.
They all have conditional formatting applied such that negative numbers are
red. For some reason, one of the text boxes refuses to show the red text,
always showing the text as black instead. The only thing that is unique
about this text box is that it is filled in by Visual Basic code and not
using a field from a table or some other method (like DSum).

Please let me know if you have a clue about why the conditional formatting
doesn't work on this one text box.

Thanks,

Eric
 
Never mind, I figured it out. My own clue helped - since it's filled in by
VBA, and not by a field, I had to use an expression: [Text370]<0. That's
all it took.
 
I have several text boxes on my main form that display numbers as currency.
They all have conditional formatting applied such that negative numbers are
red. For some reason, one of the text boxes refuses to show the red text,
always showing the text as black instead. The only thing that is unique
about this text box is that it is filled in by Visual Basic code and not
using a field from a table or some other method (like DSum).

Please let me know if you have a clue about why the conditional formatting
doesn't work on this one text box.

Thanks,

Eric

Hard to tell you why when you haven't told us 'exactly' what your
conditional formatting is.

In any event, if you only wish to show negative values in red you do
not need conditional formatting.
Set the Format property of the control to:

$#,##0.00 [Black];$-#,##0.00 [Red];0 [Black];

See Access help on
Format property + Number and Currency datatypes
to see why this will work.
 
Back
Top