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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum on multiple fields

Status
Not open for further replies.

shankbanta

Technical User
Apr 15, 2003
43
US
In Excel there is a SUM function that you can list a range of cells to add. Is there such a function in Access?
I have:
Form1 (math function)
Form2 (math function)
Form3 (math function) etc for 35 forms

I would like to have the sum of all the math functions to calculate.

Now, I am a novice at Access, so be kind.

 
35 forms that have the same math function? Did you normalize your data first?
To answer your question, let's say to make it simple, the answer of your math function is in a textbox called text1 on each form. On form 36(?), create another textbox, called result.
On the AfterUpdate event of each answer box on each of the 35 forms, you can put Forms![Form36Name]![Result] = Forms![Form1Name]![Text1] + Forms![Form2Name]![Text1]+etc..

This will then update the final result when any of the other totals change. All forms must be opened by the way.

This would be like you had 35 individual sheets in Excel.

I would change your design.

Neil
 
Table: Forms
Fields: Foreign Key
SectionsPerInch
Form1
Form2
Form3 etc to 32
Form1Section
Form2Section
Form3Section etc to 32

The function of the form is to take the SectionsPerInch and multiply it by Form1 (which is the number of inches used) and stores that number in Form1Section. Then I add together all of the Form(n)Sections together to get the total section. This number is then entered into the main form for further calculations.

On the frmForms It has all 32 sections available for possible entry.

This may not be the easiest way to perform what I need, but I am a novice and willing to learn.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top