Different Color for Negative and Positive Value

A

Aamer Sheikh

Need Help!
Can someone help me.
I am trying to make an accounts package, if the value is in negative it
should show in red color and if its in positive then in blue. How can i do
that.

Help would be appreciated.

Thanks
 
T

Tom

In the AfterUpdate property of the Debit & Credit field
I use:

If Nz(Me![Debits]) > Nz(Me![Credits]) Then

Me![Bal].ForeColor = 255

ElseIf Nz(Me![Debits]) = Nz(Me![Credits]) Then

Me![Bal].ForeColor = 16711680

ElseIf Nz(Me![Debits]) < Nz(Me![Credits]) Then

Me![Bal].ForeColor = 10485760

End If
 
F

fredg

Need Help!
Can someone help me.
I am trying to make an accounts package, if the value is in negative it
should show in red color and if its in positive then in blue. How can i do
that.

Help would be appreciated.

Thanks

What do you want to show if it is Zero?
Set the Format property of the control to:

#,###.00[Blue];-#,###.00[Red];0.00[Black]
Or.... since accountants like to use () for negative numbers, you
could also use:
#,###.00[Blue];(#,###.00)[Red;0.00[Green]

See Access Help on
Format Property + Number and Currency datatypes
 
A

Aamer Sheikh

Thx fredg, your reply was great help.

fredg said:
Need Help!
Can someone help me.
I am trying to make an accounts package, if the value is in negative it
should show in red color and if its in positive then in blue. How can i do
that.

Help would be appreciated.

Thanks

What do you want to show if it is Zero?
Set the Format property of the control to:

#,###.00[Blue];-#,###.00[Red];0.00[Black]
Or.... since accountants like to use () for negative numbers, you
could also use:
#,###.00[Blue];(#,###.00)[Red;0.00[Green]

See Access Help on
Format Property + Number and Currency datatypes
 
A

Aamer Sheikh

Thx Tom, your reply was great help.

Tom said:
In the AfterUpdate property of the Debit & Credit field
I use:

If Nz(Me![Debits]) > Nz(Me![Credits]) Then

Me![Bal].ForeColor = 255

ElseIf Nz(Me![Debits]) = Nz(Me![Credits]) Then

Me![Bal].ForeColor = 16711680

ElseIf Nz(Me![Debits]) < Nz(Me![Credits]) Then

Me![Bal].ForeColor = 10485760

End If
-----Original Message-----
Need Help!
Can someone help me.
I am trying to make an accounts package, if the value is in negative it
should show in red color and if its in positive then in blue. How can i do
that.

Help would be appreciated.

Thanks
.
 

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