sum amount from table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hello, I have a text box that I would like to calculate the total amount of a
field from a table. I have tried
=Sum([Maintenance]![Amount])
but that gives me an error. Can I not calculate the sum in a text box?

TIA
 
Assuming because this post is in reports, the text box is on a report and the
Maintenance table and fields are not in the underlying recordsource for the
report. You need to use DSum function.

=DSum("Amount","Maintenance")

This will add up the Amount field for every record in the maintenance table.
There is a third optional parameter to DSum where you can specify criteria.
Look up DSum in the Help.
 
Back
Top