Report Colouring

GJT

Registered User.
Local time
Today, 18:35
Joined
Nov 5, 2002
Messages
116
Is it possible to change the fore / back color of a text field on a report depending upon the string value contained within?????
If so - how?

Thanks

GJT
 
Conditional Formatting?

Have you looked in Access Help or Search on this site under "conditional formatting"?
As to using them in reports, I'm not exactly sure about it. I will leave that up to you. But I would guess that you can use them.
If you have any problems, give us a shout!
HTH
 
In design view right click a field on your report and select "conditional formating"
 
Coloring

Hi there,

You could put some code on the Format event of the Detail section or the whatever section the control lies - It goes something like this :

If Text1.Value = whatever then
text1.forecolor = vbblue
text1.backcolor = vbred
end if

Works fine for me.

Bert.
 
All the answers are fine in Access 2000 or later. Access 97 doesn't do conditional formatting. However, there is a workaround on Microsofts web site that involves overlaying different formatted objects on the report and setting them to foreground or background. It works, but it was enough to prompt me to move to Access 2000!
 
One problem I've found with 2000 and 2002 is that the expression builder isn't available while building VBA code. Or I have figured out how to use it there. I keep a blank query open building expressions with the expression builder in a criteria field.
 

Users who are viewing this thread

Back
Top Bottom