I am an access n00b.... so please bear with me! 
I have a table that has some sales data: for a given invoice, there are a number of units sold, and a cost per unit. One invoice can have a number of different items on it. Eg:
Now: What I want to do is have a query return the TOTAL cost for the invoice.
I have an expression that calculates total price (quantity_sold * unit price). Running this, I get:
What I now want is to sum the total for the invoice, such that the output is just:
Can someone please explain how to do this? In the query builder, I have tried to output Invoice as "group by" and TotalCost as "sum", but that doesn't work.
Thanks!

I have a table that has some sales data: for a given invoice, there are a number of units sold, and a cost per unit. One invoice can have a number of different items on it. Eg:
Code:
Invoice UnitID Quantity_sold UnitPrice
1001 100 3 100
1001 101 1 200
1001 102 1 10
Now: What I want to do is have a query return the TOTAL cost for the invoice.
I have an expression that calculates total price (quantity_sold * unit price). Running this, I get:
Code:
Invoice TotalCost
1001 300
1001 200
1001 10
What I now want is to sum the total for the invoice, such that the output is just:
Code:
Invoice TotalCost
1001 510
Can someone please explain how to do this? In the query builder, I have tried to output Invoice as "group by" and TotalCost as "sum", but that doesn't work.
Thanks!
Last edited: