Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Summing Text Boxes 1

Status
Not open for further replies.

Szigeti

Technical User
Mar 26, 2000
7
0
0
US
In a form, I have 4 to 5 Text Boxes that have different values. I am trying to have an additional unbounded Text Box that will give me the sum of all the values in the other Text Boxes (for example – 10+15+21+15=61). I have tried =[Name of 1st box]+[Name of 2nd box]etc. but that gives me accumulation of the boxes 10+15+21+15=10152115 rather than 61.

Thank you for your help

Josef
 
Hi,

Are the numbers stored as text?
you could try =CLng([Name of 1st box])+CLng([Name of 2nd box])etc.
I thought Access did this automatically anyway so I could be wrong.
 
You also need to check that the 'values' are (can be?) numeric.

CLng("This is Text") will return an error.

MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Change the format properties on the text boxes to general number. Remember amateurs built the ark - professionals built the Titanic

[yoda]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top