Solved

Sum the total in a group to get grand total

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
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…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

744 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

16 Experts available now in Live!

Get 1:1 Help Now