the SUM function.. please help, assignment due

N

Nicky

this is apparently the easiest question..ohh please help me

how do i find the total price of all stock items in the database.. it says
here (use total query and find the SUM of the price of the stock) <-- i can
do that.. the answer is $157.. but thats only for one of each item... how can
i multiply this price by the number of 'OnHand' stock...btw 'Price' and
'OnHand' are the field names
 
K

Ken Sheridan

In the 'field' row of the column in design view change it from the Price
field name to an expression which multiplies the price by the number in stock
(which I assume is what the OnHand field holds), e.g.

Total Stock Value: [Price]*[OnHand]

Again select 'Sum' as the aggregation operator in the 'Total' row for the
column. This will return a column headed Total Stock Value. You can of
course change the column heading to whatever you wish.

Ken Sheridan
Stafford, England
 
C

Chris O'C via AccessMonster.com

It's homework, so we can't give you the answer but we can give you a hint.
You need to create a calculated field in the design grid and sum that
calculation. Put your calculation in the top combo box. Here's the syntax:

TotCost: fieldname * anotherFieldname

Since you want a sum of this calculation, change the Total combo box to Sum.
Run your query.

Chris
Microsoft MVP
 
C

Chris O'C via AccessMonster.com

It's homework, so we can't give you the answer but we can give you a hint.
You need to create a calculated field in the design grid and sum that
calculation. Put your calculation in the top combo box. Here's the syntax:

TotCost: fieldname * anotherFieldname

Since you want a sum of this calculation, change the Total combo box to Sum.
Run your query.

Chris
Microsoft MVP
 
C

Chris O'C via AccessMonster.com

It's homework, so we can't give you the answer but we can give you a hint.
You need to create a calculated field in the design grid and sum that
calculation. Put your calculation in the top combo box. Here's the syntax:

TotCost: fieldname * anotherFieldname

Since you want a sum of this calculation, change the Total combo box to Sum.
Run your query.

Chris
Microsoft MVP
 
C

Chris O'C via AccessMonster.com

Sorry about the duplicate posts. The page hung and I waited for a few
minutes before hitting the back button and resubmitting, but that looks like
it was the third time my post went through.

Chris
Microsoft MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top