Solved

Form  to show Sum of detail lines

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now