all totals are not derived!!!

M

manish

I made a query which among others have two fields that are
contained in a table. One is 'Amount' the other is 'STax'.
Now i want to get the total of both the fields in a third
field in the query.
but when i typed like this in the query design mode :

Gross received : [Amount]+[STax]

not all totals were shown. and this was mainly where some
of the STax fields were blank or do not contain any data.

How to over come this problem. Any advices????
thanks
 
D

Duane Hookom

If one of the fields is blank, what would you expect to see? You might want
to use
GrossReceived: Nz(Amount,0)+Nz(STax,0)
 
M

manish

Dear Duane
Thank you very much for the advice. It worked. However i
would like to know the meaning of Nz and why is there a 0
as argument. this is for only my information.
thanks anyway
manish
-----Original Message-----
If one of the fields is blank, what would you expect to see? You might want
to use
GrossReceived: Nz(Amount,0)+Nz(STax,0)

--
Duane Hookom
MS Access MVP
--

I made a query which among others have two fields that are
contained in a table. One is 'Amount' the other is 'STax'.
Now i want to get the total of both the fields in a third
field in the query.
but when i typed like this in the query design mode :

Gross received : [Amount]+[STax]

not all totals were shown. and this was mainly where some
of the STax fields were blank or do not contain any data.

How to over come this problem. Any advices????
thanks


.
 
D

Duane Hookom

Nz() tests the first argument to determine if it is Null. If it is Null,
then the second argument is returned by the function. If the first argument
is not Null then the first argument is returned. I believe you can leave out
the second argument but I feel this is sloppy.

--
Duane Hookom
MS Access MVP
--

manish said:
Dear Duane
Thank you very much for the advice. It worked. However i
would like to know the meaning of Nz and why is there a 0
as argument. this is for only my information.
thanks anyway
manish
-----Original Message-----
If one of the fields is blank, what would you expect to see? You might want
to use
GrossReceived: Nz(Amount,0)+Nz(STax,0)

--
Duane Hookom
MS Access MVP
--

I made a query which among others have two fields that are
contained in a table. One is 'Amount' the other is 'STax'.
Now i want to get the total of both the fields in a third
field in the query.
but when i typed like this in the query design mode :

Gross received : [Amount]+[STax]

not all totals were shown. and this was mainly where some
of the STax fields were blank or do not contain any data.

How to over come this problem. Any advices????
thanks


.
 
Top