SUM Expression on a Report

  • Thread starter Thread starter Abee
  • Start date Start date
A

Abee

I am very new to Access.

I have two columns of numbers on my list. I ask Access
using =SUM9{DR])-sum([CR])to show for each group the net
differnce of the two columns (DR & CR).

The Report gives me the right value when there is numbers
in both columns but shows nothing when for a group there
is only values in one column. Also it shows negative
numbers as -x.xx instead of (x.xx). Can I get it to show
text NIL when the result is zero

I would appreciate any support.

Thank You

Abee
 
Abee,
Look up the Nz() function in Help.

=Sum(Nz(DR,0)) - Sum(Nz(CR,0))

To format the control to show (100) instead of -100,
and "Nil" instead of 0, enter, on the Control's Format
property line:

#;(#);"NIL"

See Access Help on
Format property + Numbers and currency
 
Be careful there is a bug with the Nz() and Access 2002.
I'm having a similar problem...


-----Original Message-----
Abee,
Look up the Nz() function in Help.

=Sum(Nz(DR,0)) - Sum(Nz(CR,0))

To format the control to show (100) instead of -100,
and "Nil" instead of 0, enter, on the Control's Format
property line:

#;(#);"NIL"

See Access Help on
Format property + Numbers and currency

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


Abee said:
I am very new to Access.

I have two columns of numbers on my list. I ask Access
using =SUM9{DR])-sum([CR])to show for each group the net
differnce of the two columns (DR & CR).

The Report gives me the right value when there is numbers
in both columns but shows nothing when for a group there
is only values in one column. Also it shows negative
numbers as -x.xx instead of (x.xx). Can I get it to show
text NIL when the result is zero

I would appreciate any support.

Thank You

Abee


.
 
Back
Top