Solved

Form  to show Sum of detail lines

Posted on 2011-03-22
4
279 Views
Last Modified: 2012-05-11
See attached.
Click form frmMainBig.

This shows a single customer (tblCustomers) who is buying 3 products (tblQuoteDetails - see the green bits).

Specifically, note the "line value" in green.

Now look at the orange field at the bottom of the subform.
I want the orange to show the sum of the "line values".

i.e. the Orange should show the sum of the green "line value"
I have tried various options but am unsure of my approach.

All help appreciated!  I hope this is clear.
Database11.zip
0
Comment
Question by:Patrick O'Dea
  • 3
4 Comments
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 35194902
In your subform, frmQuoteDetails, place a text control in the forms footer.

  Call it txtLineTotal.  Set it's controlsource to:

 =Sum([qty]*[PriceAfterDiscount])

 Now in the main form, set the controlsource for XXSumOrderValue to:

 =Forms![frmMainBig]![frmQuoteDetails].Form![txtLineTotal]

JimD.

0
 
LVL 57
ID: 35194903

 BTW, the text control in the subform can be hidden.

JimD.
0
 
LVL 57
ID: 35194922
Slight correct; the text control in the subform footer needs its controlsource to be:

=Sum([Qty]*([sellprice]*(1-[DiscountPercent])))

JimD.
0
 

Author Closing Comment

by:Patrick O'Dea
ID: 35195042
perfect !

Thankyou!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question