Making calculated Negative numbers a different color in access 200

G

Guest

I have a MSAccess 2003 database which has a calculated field. This field may
return a negative number. Is it possible to have negative numbers display in
a different color (such as red) then the positive numbers in a calculated
field?(I do know how to set the static colors.) If so how?

Thanks in advance.
 
G

Guest

Hi.

It's possible to do this for controls in forms and reports, but not for
queries in Datasheet View, if that's what you are seeking. Please see the
following Web page for a link to the Tom Wickerath's tutorial, "Conditional
Formatting In Forms And Reports":

http://www.Access.QBuilt.com/html/articles.html

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.
 
F

fredg

I have a MSAccess 2003 database which has a calculated field. This field may
return a negative number. Is it possible to have negative numbers display in
a different color (such as red) then the positive numbers in a calculated
field?(I do know how to set the static colors.) If so how?

Thanks in advance.

In a Report, or on a Form, simply set the control's format property
to:
#[Black];-#[Red];0[Black];

See Format Property + Number and Currency datatypes
for more information.
 
D

David C. Holley

You'll want to use Conditional Formatting on the field. Right click on
the field and select CF from the popup window or TOOLS>CONDITIONAL
FORMATING.
 

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