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
Microsoft Access

Avatar of undefined
Last Comment
als315

8/22/2022 - Mon
Gustav Brock

Try with:

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

/gustav
ASKER CERTIFIED SOLUTION
als315

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes