Conditional formatting in Access

Posted by every_answer_gets_a_point on Stack Overflow See other posts from Stack Overflow or by every_answer_gets_a_point
Published on 2010-05-25T17:10:09Z Indexed on 2010/05/26 22:31 UTC
Read the original article Hit count: 193

Filed under:
|
|

I have a datasheet that looks like this:

ID  name_   1   2   3   4
1   name1   x   0   0   0
2   name2   0   x   0   0
3   name3   0   0   x   0
4   name4   0   0   0   x

I have rectangles on a report that correspond to this datasheet.

When the report opens, I need the rectangles to be colored red according to the data. For example, in the name1 row where there is an x in the 1 column, I need the specific rectangle corresponding to this (name1, 1) to be colored red. Here is the result that I need:

x           
    x       
        x   
            x

(where x is a rectangle that is red)

Perhaps the best place to place this code would be in ON LOAD event of the report, but i am not sure exactly. Can you please suggest to me some code that would turn the specified rectangles red according to the data?

© Stack Overflow or respective owner

Related posts about sql

Related posts about ms-access