Adding up total cost

C

Chris McGowan

Hi people.

This may seem a basic question, but im using a subform to add product
details to , and this has the fields 'price' and 'quantity'. I have then used
these to work out a subtotal on the cost for each item depending on the
amount purchased.

What i then want to do is have a textbox on the main form showing the total
cost (the sum of the subtotal) yet cant seem to get the expression right.

Im currently usins Microsoft Access 2003.

Thanks
 
M

Marshall Barton

Chris McGowan said:
This may seem a basic question, but im using a subform to add product
details to , and this has the fields 'price' and 'quantity'. I have then used
these to work out a subtotal on the cost for each item depending on the
amount purchased.

What i then want to do is have a textbox on the main form showing the total
cost (the sum of the subtotal) yet cant seem to get the expression right.

Im currently usins Microsoft Access 2003.


Put a text box (named txtTotal) in the subform's footer
section and set its expression to =Sum(Price * Quantity)

Then the main form can use a text with an expression like:
=subformcontroname.Form.txtTotal to display the total.
 

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