Formulas

joce

Registered User.
Local time
Today, 13:59
Joined
Oct 27, 2011
Messages
43
Hi I need to create a formula that will total up the values i have in several fields inside one table. How should I go about doing this? Am i ment to make a query? or do it in a form?

Any help would be much appreciated
 
You can use either a form of query.

Are you trying to get the total of each column, or the sum of one or more fields in each row?
 
I have a table which contains 8 fields, each says for example..

Ingredient 1 quantity
Ingredient 2 quantitiy
Ingredient 3 quantity
etc etc

The values which i place in each of these fields, I want to total up and get the sum of all the ingredients, so i will have a field below saying the toal quantity of all ingredients used if that makes anymore sense?
 
So effectively the query will search for each instance of any ingredient and then total it up. Kind of like a shopping list?
 
Yes pretty much.

But I dont understand what I do to achieve this. And if I am ment to tackle this in the tables, or the queries or reports part of the database.
 
Just reading back through, in your table you have 8 fields. What are all the field names?
 
Quantity 1
Quantity 2
Quantity 3
Quantity 4
Quantity 5
Quantity 6
Quantity 7
Total quantity fed to group

Not sure If i need the "total quantity fed to group" one


Thank you for helping btw
 
Do this: Drop a text box at the bottom of the last field. Then right click on the new text box, click on properties, click on data tab, and type below formula next to record source.
Code:
=sum([ingredient 1]+[ingredient 2]+[ingredient 3])

This will give you total of all three fields for each entry. If you want to see the grant total, then come to the footer of the form and drop a similar text box and type the same expression.

Hope it helps.

Dad
 

Users who are viewing this thread

Back
Top Bottom