YOu can't sum a text box. You can sum a field from the report's record source. The text box with the sum should go in a group or report header or footer section.
=Sum([TheFieldName])
This will not work in a page footer. Also, the name of the text box must not be the name of any field.
Duane
MS Access MVP
Find out how to get great answers faq219-2884.
Go into design view of your report
from the toolbox place a text box into the footer of your Report
In the Properies of the textbox, you placed in the report footer under Control Source type =Sum([yourFieldName]) that
should work
There is no such field type as "Open/Close". There are text, yes/no, date, currency,... field types. If a field value is "Open" then I expect the field type is text. To count the records in a report where the [ValveStatus] = "Open", use a text box in a group or report footer bound to the expression:
=Sum(Abs([ValveStatus]="Open"))
Duane
MS Access MVP
Find out how to get great answers faq219-2884.
Still not quite getting it. Suppose I have a text box with a name of Widgets and the control source is "=[query1]". I'm trying to put a total for the column that is generated. Based on the above this should be a text box with a control source of =sum([Widgets]).
Instead of working I get prompted for the value of Widgets. Why does this happen?
You can't set a control source to the name of a query. Also, you can't sum a textbox or any other control. You can sum fields or expressions created from fields.
Duane
MS Access MVP
Find out how to get great answers faq219-2884.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.