Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 97 Report

Status
Not open for further replies.
Aug 16, 2002
4
US
I am using a IIF function in a report footer to SUM negative and positive values. This isn't working.
I reference the [Fielda} as follows:

=IIF ([Fielda]< 0, Reports![Reporta]![txtDebitControl]+ [Fielda], Reports![Reporta]![txtCreditControl]+ [Fielda])

[Fielda] is part of the query and is detailed in the report detail section.

This expression is in a control in the report footer, but no values are printed. This should produce a total of debits and a total of credits. I have set the txtCreditControl as &quot;unbound&quot;. The above expression is in the txtDebitControl (ControlSource property).

What am I doing wrong?

Thanks

DukeofEarl
 
Hiya,

Just to clarify: you are attempting to set txtDebitControl to itself + fieldA if fieldA is negative, and set txtDebitControl to the value in txtCreditControl + fieldA otherwise - yes?

Regards,

Darrylle &quot;Never argue with an idiot, he'll bring you down to his level - then beat you with experience.&quot;
 
That is correct. There are two calculated controls. The IIF expression is in the txtDebitControl andnthe txtCreditControl is unbound. Nothing calculates and of course it prints blanks in the report footer.

DukeofEarl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top