Solved

Sum the total in a group to get grand total

Posted on 2013-02-01
2
424 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

772 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