Field Totals

T

tim

I created a report that uses a table as its source containing the following
fields:



clientnum

amtdue

code



Along with these 3 fields I need to display the sum of the field labeled
amtdue where the code field is equal to "act" in one text box and where the
code field is equal to "nonact" in another text box. Is this possible to do
on the same report?



Thanks for any help,

Tim
 
K

Klatuu

For One
=IIf(
Code:
 = "act", Sum([amtdue]), Null)
For the other
=IIf([code] = "nonact", Sum([amtdue]), Null)
 
T

tim

Thank you for the help.

Tim

Klatuu said:
For One
=IIf(
Code:
 = "act", Sum([amtdue]), Null)
For the other
=IIf([code] = "nonact", Sum([amtdue]), Null)
--
Dave Hargis, Microsoft Access MVP


[QUOTE="tim"]
I created a report that uses a table as its source containing the following
fields:



clientnum

amtdue

code



Along with these 3 fields I need to display the sum of the field labeled
amtdue where the code field is equal to "act" in one text box and where the
code field is equal to "nonact" in another text box. Is this possible to do
on the same report?



Thanks for any help,

Tim
[/QUOTE][/QUOTE]
 
M

Marshall Barton

Klatuu said:
For One
=IIf(
Code:
 = "act", Sum([amtdue]), Null)
For the other
=IIf([code] = "nonact", Sum([amtdue]), Null)[/QUOTE]


I think that should be:

=Sum(IIf([code] = "act", [amtdue], 0))
and
=Sum(IIf([code] = "nonact", [amtdue], 0))
or any number of variations on that theme.
 
T

tim

Thank you,

Tim


Marshall Barton said:
Klatuu said:
For One
=IIf(
Code:
 = "act", Sum([amtdue]), Null)
For the other
=IIf([code] = "nonact", Sum([amtdue]), Null)[/QUOTE]


I think that should be:

=Sum(IIf([code] = "act", [amtdue], 0))
and
=Sum(IIf([code] = "nonact", [amtdue], 0))
or any number of variations on that theme.
[/QUOTE]
 

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