In Footer - Sum a Detail textbox

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
 
A

Al Campagna

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."
 
M

Marshall Barton

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top