Totaling An Aggregate Expression On A Report

A

amywolfie

Hi:

I have a field on a report where Data Source =

=IIf([Hist Exp Deed Est]>0,Sum([DocsDEED]))

I need to get a TOTAL of this field in the Report Footer, but Access
won't let me Sum an aggregate. I've tried creationg the total on the
query, but no luck.

Can anyone help?

Thanks.
====
 
B

Bob Darlington

amywolfie said:
Hi:

I have a field on a report where Data Source =

=IIf([Hist Exp Deed Est]>0,Sum([DocsDEED]))

I need to get a TOTAL of this field in the Report Footer, but Access
won't let me Sum an aggregate. I've tried creationg the total on the
query, but no luck.

Can anyone help?

Thanks.
====

Try =Sum(IIf([Hist Exp Deed Est]>0,Sum([DocsDEED]))) in the Total field in
the footer
 
J

John W. Vinson

amywolfie said:
Hi:

I have a field on a report where Data Source =

=IIf([Hist Exp Deed Est]>0,Sum([DocsDEED]))

I need to get a TOTAL of this field in the Report Footer, but Access
won't let me Sum an aggregate. I've tried creationg the total on the
query, but no luck.

Can anyone help?

Thanks.
====

Try =Sum(IIf([Hist Exp Deed Est]>0,Sum([DocsDEED]))) in the Total field in
the footer

Bob, shouldn't IIF have three arguments not two? Try

=Sum(IIf([Hist Exp Deed Est]>0,Sum([DocsDEED])),0)
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 
B

Bob Darlington

John W. Vinson said:
amywolfie said:
Hi:

I have a field on a report where Data Source =

=IIf([Hist Exp Deed Est]>0,Sum([DocsDEED]))

I need to get a TOTAL of this field in the Report Footer, but Access
won't let me Sum an aggregate. I've tried creationg the total on the
query, but no luck.

Can anyone help?

Thanks.
====

Try =Sum(IIf([Hist Exp Deed Est]>0,Sum([DocsDEED]))) in the Total field in
the footer

Bob, shouldn't IIF have three arguments not two? Try

=Sum(IIf([Hist Exp Deed Est]>0,Sum([DocsDEED])),0)
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com

Thanks for pointing that out John.
It was sloppiness on my part.
 
J

John Spencer

I think the expression should be

=Sum(IIF([Hist Exp Deed Est]>0,[DocsDEED],Null))


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

John W. Vinson said:
Hi:

I have a field on a report where Data Source =

=IIf([Hist Exp Deed Est]>0,Sum([DocsDEED]))

I need to get a TOTAL of this field in the Report Footer, but Access
won't let me Sum an aggregate. I've tried creationg the total on the
query, but no luck.

Can anyone help?

Thanks.
====

Try =Sum(IIf([Hist Exp Deed Est]>0,Sum([DocsDEED]))) in the Total field in
the footer

Bob, shouldn't IIF have three arguments not two? Try

=Sum(IIf([Hist Exp Deed Est]>0,Sum([DocsDEED])),0)
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com

Thanks for pointing that out John.
It was sloppiness on my part.
 

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