A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

SUM



 
 
Thread Tools Display Modes
  #1  
Old October 29th, 2004, 11:02 AM
Wantula
external usenet poster
 
Posts: n/a
Default SUM

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

  #2  
Old October 29th, 2004, 11:22 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default

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

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Wantula" wrote in message
...
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



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.