Fonts Color

A

Alimbilo

Hello,
How can I have a font to change color for example if the answer is negative,
I want it to be in RED and if it's positive BLACK.

Thanks
 
M

Margaret Bartley

If this is a report, in the BeforeFormat option of the Detail section,
put
If Answer <0 then
Answer.FontColor=255
Else
Answer.FontColor=0
End If
 
L

Linq Adams via AccessMonster.com

I'm familiar with the Detail_Format event of the Detail section of a report,
but what version of Access do you find the BeforeFormat event in?
 
J

John Spencer

IF this is on a report, you can use the format property of the control.

Just set the format to something like the following.
#,##0.00[Black];-#.##0.00[Red];0[Green]



John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 

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