SUM

W

Wantula

I have this TABLE, I want to automatically come up with SubTotal, as soon as
I enterThe Unit Cost and finally come up with the Total (sum of all figures
in SubTotal field)
Sale # Date Item Bought Quantity Unit Cost SubTotal Total
1 10/10/2004 Jean 2 120,000
2 23/10/2004 Handbag 1 100,000
3 29/10/2004 Snickers 1 250,000

How do I achieve this?
Please help
 
A

Allen Browne

There is a very, very simple way to do this, so it can never go wrong.
Put the calculated fields into a query.

1. Remove the Total and SubTotal fields from your table.

2. Create a query into this table.

3. Type this into the Field row in query design:
SubTotal: CCur(Nz([Quantity] * [Unit Cost], 0))

4. Use this query as the source for your form.

Now in the Form Footer section of your form, add a text box with this
Control Source:
=Sum([SubTotal])
This shows the total.

For more information, see:
Calculated fields
at:
http://members.iinet.net.au/~allenbrowne/casu-14.html
 

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