In Footer - Sum a Detail textbox

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hi. I have a textbox named txtAmount in the report's detail. txtAmount has a
control source that contains an IIF statement. I need to display a SUM of
txtAmount in the footer. Since txtAmount is not bound directly to a
datafield, how do I sum all txtAmounts and display the value in the footer?

Thanks!
Mike
 
Mike,
Have you considered adding the calculation to the query behind the
report?
In the query design grid...
txtAmount : (your calculation/iif)

Now txtAmount is a bound field, and can be...
=Sum(txtAmount)
in any report group or report footer.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
Mike said:
Hi. I have a textbox named txtAmount in the report's detail. txtAmount has a
control source that contains an IIF statement. I need to display a SUM of
txtAmount in the footer. Since txtAmount is not bound directly to a
datafield, how do I sum all txtAmounts and display the value in the footer?


You can use Sum on an expression containing fields. E,g,
If the txtamount expression is =Quantity * Price then the
footer text box can use =Sum(Quantity * Price)
 
Back
Top