Code in report

M

Mavis

Hi All,

Can tell me what is wrong with my below code?

=Sum((IIf(IsNull([DatePaid]),0,([InvoicedAmount]/[InvoiceROE])))+Sum([P&I
Credit])+Sum([P&ICredit]))
 
S

Software-Matters via AccessMonster.com

What happens when you run it? What error message do you get? What are you
trying to achieve?
Hi All,

Can tell me what is wrong with my below code?

=Sum((IIf(IsNull([DatePaid]),0,([InvoicedAmount]/[InvoiceROE])))+Sum([P&I
Credit])+Sum([P&ICredit]))
 
M

Mavis

Hi,

The fulll error message is as below.
"cannot have aggregate function in expression
=Sum((IIf(IsNull([DatePaid]),0,([InvoicedAmount]/[InvoiceROE])))+Sum([P&I
Credit])+Sum([P&ICredit]))."
I have 3 fields in the report. The 3 fields are a result from diff formula.
i will like to sum up the results of the 3 fields.



Software-Matters via AccessMonster.com said:
What happens when you run it? What error message do you get? What are you
trying to achieve?
Hi All,

Can tell me what is wrong with my below code?

=Sum((IIf(IsNull([DatePaid]),0,([InvoicedAmount]/[InvoiceROE])))+Sum([P&I
Credit])+Sum([P&ICredit]))

--
http://www.software-matters.co.uk/bespoke-database-design.html
Bespoke Access Database Development
Software Matters
Straightforward solutions that work
 
S

Software-Matters via AccessMonster.com

If you have 3 fields on your report and you would like to sum them all
together I would add 3 fields to the report footer as follows:

sum(field1)
sum(field2)
sum(field3)

then add them altogether
 
Top