Conditional Formatting

  • Thread starter Thread starter Anthony Viscomi
  • Start date Start date
A

Anthony Viscomi

I am creating a report that has the following fields that derive from a Xtab
qry:

Site# Truck1 Truck2 Truck3 Truck4 Truck5 Truck6 Truck7
123 .0145 .123 .122 165 .369 .2369
..963

I would like to compare all of the Truck(s) against each other in order
to find the best, 2nd best, 3rd best, etc. rates. Then somehow apply
condtional formatting in order to highlight those value with various colors.

Can this be achieved? The "built-in" conditional formatting only allows 3
conditions.

Thanks in advance!
Tony
 
As you guessed, you can highlight up to 3 colors only with CF.

In query design view, you can use Max to choose the highest value for the
row (specifying this new column as a Row Heading.) This would make it easy
to use CF in a report.

If you want to go beyond that, you will need to use code in the Format event
of the (Detail?) section of your report. Create an array from the values.
Sort the array (a bubble sort would probably do), and you can then specify
the BackColor of each text box.
 
Back
Top