Different Color for Negative and Positive Value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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
 
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
 
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
.
 
Back
Top