Access 97: change color of data

S

semimaker

I would like to be able to change the color of data in reports based on a
limits table, is this possible without conditional formating which is Access
2000?
 
O

Ofer

You can enter the code in the "on print" or the "format" event of the section
where the field is located, in the report.

If Condition=true then
me.FieldName.ForeColor = ChooseAColor
Else
me.FieldName.ForeColor = ChooseAColor
End if
 
W

Wayne Morgan

Yes, you can use the Format event of the report section the control is in to
change the fore color or back color of the control.

Example:
If Me.txtMyTextbox = 3 Then
Me.txtMyTextbox.BackColor = vbRed
End If

Instead of vbRed, you could use the color picker in the control's Properties
sheet to pick a color then copy and paste the number it gives you into the
code.
 
Top