Conditional Formatting

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
 
A

Allen Browne

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top