Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Form  to show Sum of detail lines

Posted on 2011-03-22
4
272 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
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…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

791 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