Link to home
Start Free TrialLog in
Avatar of LindaOKSTATE
LindaOKSTATEFlag for United States of America

asked on

Sum text boxes using the name of the control in Access

This seems like a very basic question but I can't get it to work.  I have many totals on a report.  Most totals are already sums of other subtotals.  I can sum easily  by using the actual field names, but since the field names are long, I wanted to just name the text boxes 1- 30, or even leave them text1, text 2, text3, etc.
 I can get the subtotals using =Sum([FieldName1] + [FieldName2]) and =Sum([FieldName3] + [FieldName4]) .  But now I want to add all of them together and the expression will be very long.  I want to do something like =Sum([text1] + [text2]) but Access keeps asking for the parameter values Text1 and Text2.
Any ideas?  
LindaOKState
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Try with:

=Sum([Reports]![rptYourReportName]![text1] + [Reports]![rptYourReportName]![text2])

/gustav
ASKER CERTIFIED SOLUTION
Avatar of als315
als315
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial