Field Totals

  • Thread starter Thread starter tim
  • Start date Start date
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
 
For One
=IIf(
Code:
 = "act", Sum([amtdue]), Null)
For the other
=IIf([code] = "nonact", Sum([amtdue]), Null)
 
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]
 
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.
 
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]
 
Back
Top