Totals for 2 Currency Fields

B

Billsam8

I am trying to get a total on 2 fields: 2009 amount & 2009 pledge amount -
all lower case.

I am using the following in the Report footer - I don't get an error but it
doesn't total:

=Sum([2009 amount]+[2009 pledge amount])

Here's the funny part - if I use the same fields together [2009
amount]+[2009 amount] or [2009 pledge amount]+[2009 pledge amount] it totals
correctly.

Can someone please help. Thanks in advance for your help.

Bill
 
J

John Spencer

If one of the fields is null then the sum will be null and then your
total will be null will test the record as if it were zero instead of
the sum of the two fields. You can try using the NZ function to force
zero values when the field is null.

=Sum(Nz([2009 amount],0)+Nz([2009 pledge amount],0))

or if there is always a sum for each field individually, then you could try

=Sum([2009 amount]) + Sum([2009 pledge amount])

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
J

John Spencer

If one of the fields is null then the sum will be null and then your
total will be null will test the record as if it were zero instead of
the sum of the two fields. You can try using the NZ function to force
zero values when the field is null.

=Sum(Nz([2009 amount],0)+Nz([2009 pledge amount],0))

or if there is always a sum for each field individually, then you could try

=Sum([2009 amount]) + Sum([2009 pledge amount])

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
B

Billsam8

Hi John -

Thanks for the quick reply. I tried your second suggestion and it worked.

Thanks for the help. This was driving me nuts.
Bill

John Spencer said:
If one of the fields is null then the sum will be null and then your
total will be null will test the record as if it were zero instead of
the sum of the two fields. You can try using the NZ function to force
zero values when the field is null.

=Sum(Nz([2009 amount],0)+Nz([2009 pledge amount],0))

or if there is always a sum for each field individually, then you could try

=Sum([2009 amount]) + Sum([2009 pledge amount])

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================

I am trying to get a total on 2 fields: 2009 amount & 2009 pledge amount -
all lower case.

I am using the following in the Report footer - I don't get an error but it
doesn't total:

=Sum([2009 amount]+[2009 pledge amount])

Here's the funny part - if I use the same fields together [2009
amount]+[2009 amount] or [2009 pledge amount]+[2009 pledge amount] it totals
correctly.

Can someone please help. Thanks in advance for your help.

Bill
 
B

Billsam8

Hi John -

Thanks for the quick reply. I tried your second suggestion and it worked.

Thanks for the help. This was driving me nuts.
Bill

John Spencer said:
If one of the fields is null then the sum will be null and then your
total will be null will test the record as if it were zero instead of
the sum of the two fields. You can try using the NZ function to force
zero values when the field is null.

=Sum(Nz([2009 amount],0)+Nz([2009 pledge amount],0))

or if there is always a sum for each field individually, then you could try

=Sum([2009 amount]) + Sum([2009 pledge amount])

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================

I am trying to get a total on 2 fields: 2009 amount & 2009 pledge amount -
all lower case.

I am using the following in the Report footer - I don't get an error but it
doesn't total:

=Sum([2009 amount]+[2009 pledge amount])

Here's the funny part - if I use the same fields together [2009
amount]+[2009 amount] or [2009 pledge amount]+[2009 pledge amount] it totals
correctly.

Can someone please help. Thanks in advance for your help.

Bill
 

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