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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

total for formula/text box

Status
Not open for further replies.

jozino01

Technical User
Apr 25, 2003
257
CA
hi,
i have one text box Text19 (in detail section) containing formula:
=IIf([mbalance]*[interest]/365*[days]>0,0,[mbalance]*[interest]/365*[days])

and i want to calculate total in the report footer (textbox Text23)
i tried different ways like control source=Sum([Report]!text19) but it doesn't work.

any idea, please?
 
well, i found a way around:

- i added one new text box Text25 into detail section, with control source=[Text19] and running sum over all
- made in not visible
- in report footer insert text box Text23 with data source=[Text25]

maybe it isn't the most elegant solution, but it works ok.
 
Try sum the expression rather than the control
=Sum(IIf([mbalance]*[interest]/365*[days]>0,0,[mbalance]*[interest]/365*[days]))


Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
i tried that and it didn't work; it showed just the last value, not total.
not sure why; maybe because [mbalance] in formula is running sum?
 
The =Sum() solution requires fields and calculations from the report's record source.

As you have probably determined, you can't sum "controls" across report sections.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top