Conditional Formatting - bug in Access 2K?

KeithWilliams

Registered User.
Local time
Today, 19:31
Joined
Feb 9, 2004
Messages
137
Hi,

I have a form that I display as Single Form. I've arranged a bunch of data values for the current year as a column down the form, with another column of corresponding values for the previous year to the right of it. To the right of that I want a 3rd column showing the net change in each value. I want the fields in the 3rd column to use a red colour for the text if it is greater than 0 (as an increase is bad), but remain default black if <= 0. I tried conditional formatting on the fields, specifying Condition 1:
"Field Value Is" "greater than" 0.
However, what happens is that a value >0 shows in red, but so does a value <0. Only a value of exactly 0 shows in the original black colour.

As an experiment, I tried Condition 1:
"Expression is" "<my field name>.Value > 0"
and that seems to work how I want, but I don't like this because it requires the field name. (I'd like to specify the conditional formatting for all the unbound fields in one go, as there are a lot, and more are likely to be added, but if they include the field name I will need to type each one individually).

Could it be that there is a bug in Access 2K's conditional formatting? Or am I leaping to wrong conclusions?

Thanks,
Keith.
 
Set the format for the control on its property sheet to
#,##0.00[Red];#,##0.00[Black]
 
Hi Rich,

That worked great, thanks for the tip! Because I didn't want decimal places in most of my fields, and I needed 0 to be black, in the end I used:
0[Red];-0[Black];0[Black]
and specified the decimal places where needed in the Decimal Places property.

I also had some fields that had been formatted as Percent, and I had to change those to:
0%[Red];-0%[Black];0%[Black]
which worked just the same as formatting with Percent, but with the correct colours.

If anyone knows whether I did find a bug in Access 2K's Conditional Formatting, I'd still like to know!

Thanks again,
Keith.
 
I use conditional formatting in A2k and it works exactly as you expect.
 

Users who are viewing this thread

Back
Top Bottom