Solved

Sum the total in a group to get grand total

Posted on 2013-02-01
2
425 Views
Last Modified: 2013-02-06
I have a report that has a group for customer which have a unapplied amount which i show in the group footer. I need to sum the total for the unapplied amount in the report footer.

I cannot use the Sum(unapplied amount) because the unapplie amount is the same for each customer and every detail will have that the same amount

Can someone let me know how i can sum it?
0
Comment
Question by:tvae
2 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 150 total points
ID: 38844641
I think you will have to create a separate query to get this total and then use a dsum to get the value.

You want a query that is something like...(amend for your own table & field names)

Select Customerid, max(unapplied) as maxunappliedamount
from table group by Customerid

If this is saved as qryUnapplied, then in your textbox for the grand total set the controlsource to..

=Dsum("maxunappliedamount", "qryUnapplied")
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38857511
Yes, this confuses me also:
<I cannot use the Sum(unapplied amount) because the unapplie amount is the same for each customer and every detail will have that the same amount>
...then how are you getting the correct total in the group footer?

As with most Report issues, it is sometimes best if you posted a sample database:
Sample database notes:
1. Back up your database(s).
2. Combine the front and back ends into one database file.
3. Remove any startup options, unless they are relevant to the issue.
4. Remove any records unless they are relevant to the issue.
5. Delete any objects that do not relate directly to the issue.
6. Remove any references to any "linked" files (files outside of the database, Images, OLE Files, ...etc)
7. Remove any references to any third party Active-x Controls (unless they are relevant to the issue)
8. Remove, obfuscate, encrypt, or otherwise disguise, any sensitive data.
9. Unhide any hidden database objects
10. Compile the code. (From the VBA code window, click: Debug-->Compile)
11. Run the compact/Repair utility.
12. Remove any Passwords and/or security.
13. If a form is involved in the issue, set the Modal and Popup properties to: No
    (Again, unless these properties are associated with the issue)
14. Post the explicit steps to replicate the issue.
15. Test the database before posting.

In other words, ...post a database that we can easily open and immediately see and/or troubleshoot the issue.
And if applicable, also include a clear graphical representation of the *Exact* results you are expecting, based on the sample data.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
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…

820 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