Hi!
I am creating a new report in MS Access 2002. When I print my report, I want the color of a field to change based upon the value of that field.
Here are some details on this issue. The field, which is called "ID code", will always have one of 16 values. The values will be repeated in the report. It is a text field. Seven of the values correspond to blue, one corresponds to gold, and the eight others correspond to green. I just want to change the color of THIS field, not the other fields in the detail band.
Here are some things that I already know. I know that the text box's font color is controlled by a property called "fore color". I know that that color is expressed as a number (for example, black is zero). I know that I can put VB code in my detail band. And, I know that I can create a lookup table with the ID codes and the matching color names as text. And, I know that I can set a relationship between my main table and my lookup table (based on ID code). And, I know that I can create an invisible field with that color name. So I need to write a little piece of code that says something like...
do case
case invisible field="blue"
make ID code fore color property = some number equating to blue
case invisible field="black"
make ID code fore color property= 0
end case
The problem is that I don't really know how to write that code
Can anyone out there get me started?
OhioSteve
I am creating a new report in MS Access 2002. When I print my report, I want the color of a field to change based upon the value of that field.
Here are some details on this issue. The field, which is called "ID code", will always have one of 16 values. The values will be repeated in the report. It is a text field. Seven of the values correspond to blue, one corresponds to gold, and the eight others correspond to green. I just want to change the color of THIS field, not the other fields in the detail band.
Here are some things that I already know. I know that the text box's font color is controlled by a property called "fore color". I know that that color is expressed as a number (for example, black is zero). I know that I can put VB code in my detail band. And, I know that I can create a lookup table with the ID codes and the matching color names as text. And, I know that I can set a relationship between my main table and my lookup table (based on ID code). And, I know that I can create an invisible field with that color name. So I need to write a little piece of code that says something like...
do case
case invisible field="blue"
make ID code fore color property = some number equating to blue
case invisible field="black"
make ID code fore color property= 0
end case
The problem is that I don't really know how to write that code
Can anyone out there get me started?
OhioSteve