=sum()

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

Guest

I have an unbound control on a report with the following as the control source

=([fsum]+[wsum]+[osum]

when fsum > 0 AND wsum > AND osum > 0 the =sum() returns a value.
If fsum OR wsum OR osum = 0, =sum() returns nothing.

To me, that doesn't make sense. How can I get the =sum() to give me a value of the 3 values, regardless of their value

tia
JMorrell
 
Try this:
=sum(nz([fsum])+nz([wsum])+nz([osum]))

Mich

JMorrell said:
I have an unbound control on a report with the following as the control source:

=([fsum]+[wsum]+[osum])

when fsum > 0 AND wsum > AND osum > 0 the =sum() returns a value.
If fsum OR wsum OR osum = 0, =sum() returns nothing.

To me, that doesn't make sense. How can I get the =sum() to give me a
value of the 3 values, regardless of their value.
 
The =sum(nz([fsum])+nz([wsum])+nz([osum])) doesn't work. I gives the error,

"The Microsoft Jet database engine does not recognize '[fsum]' as a valid field name or expression.


----- M Skabialka wrote: ----

Try this


Mic

JMorrell said:
I have an unbound control on a report with the following as the contro source
=([fsum]+[wsum]+[osum]
when fsum > 0 AND wsum > AND osum > 0 the =sum() returns a value
If fsum OR wsum OR osum = 0, =sum() returns nothing
To me, that doesn't make sense. How can I get the =sum() to give me value of the 3 values, regardless of their value
tia
JMorrel
 
Perhaps try just =(Nz([fsum])+Nz([wsum])+Nz([osum]))

--
Thanks,
Michael Wynkoop
I. T. Director
Visit us online at www.simpsonltd.com

JMorrell said:
The =sum(nz([fsum])+nz([wsum])+nz([osum])) doesn't work. I gives the error,

"The Microsoft Jet database engine does not recognize '[fsum]' as a valid field name or expression."



----- M Skabialka wrote: -----

Try this:


Mich

JMorrell said:
I have an unbound control on a report with the following as the
control
source:
=([fsum]+[wsum]+[osum])
when fsum > 0 AND wsum > AND osum > 0 the =sum() returns a value.
If fsum OR wsum OR osum = 0, =sum() returns nothing.
To me, that doesn't make sense. How can I get the =sum() to give
me a
value of the 3 values, regardless of their value.
 
I have an unbound control on a report with the following as the control source:

=([fsum]+[wsum]+[osum])

when fsum > 0 AND wsum > AND osum > 0 the =sum() returns a value.
If fsum OR wsum OR osum = 0, =sum() returns nothing.

To me, that doesn't make sense. How can I get the =sum() to give me a value of the 3 values, regardless of their value.

tia,
JMorrell

I strongly suspect that the Sum() is returning nothing when one of the
values is NULL, not zero. Do the fields in fact contain a numeric
zero, or are they blank (NULL)?

Try

=(NZ([fsum]) + NZ([wsum]) + NZ([osum]))
 
That did it. I took the Sum() portion away and it works now. Thanks again for all your help

----- John Vinson wrote: ----

On Tue, 11 May 2004 11:26:09 -0700, "JMorrell
I have an unbound control on a report with the following as the control source
=([fsum]+[wsum]+[osum]
when fsum > 0 AND wsum > AND osum > 0 the =sum() returns a value.
If fsum OR wsum OR osum = 0, =sum() returns nothing.
To me, that doesn't make sense. How can I get the =sum() to give me a value of the 3 values, regardless of their value
tia
JMorrel

I strongly suspect that the Sum() is returning nothing when one of th
values is NULL, not zero. Do the fields in fact contain a numeri
zero, or are they blank (NULL)

Tr

=(NZ([fsum]) + NZ([wsum]) + NZ([osum])


John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=publi
 
Back
Top