Results 1 to 8 of 8
  1. #1
    Analogkid is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    27

    Query totals report

    Can’t figure this one out. I want to be able to run a report to show a total of each person’s hours worked and total cost. I have created a query from a table to figure out the totals, but need to run a report to show the total of each individual. Example below

    Name: Hour worked: Wage: Total:
    John 2 $10 $20
    John 4 $10 $40
    John 2 $10 $20
    Sam 2 $20 $40
    Sam 1 $20 $20.

    I want to run a report that will calculate all of John’s total work hrs and Total.



    Name: Hour Worked Total
    John 8 $80
    Sam 3 $60

    I tried a total query but not getting the results I want like the example above.
    Thank you for your time.

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    In your Totals Query, after you click the Totals Query icon, it should show the phrase "Group By" on the Totals row under each of those three fields.
    Change the phrase "Group By" to "Sum" under your Hours Worked and Wage fields, and you should get what you want.

  3. #3
    Analogkid is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    27
    Perfect Joe! Thanks
    Now, how do I differentiate between John and Sam in the report? It shows the total of both John and Sam. How do show?

    Name: Hour Worked Total
    John 8 $80
    Sam 3 $60

    Thanks a lot! I will be almost finished with my DB once I figure this out.

  4. #4
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    What do you mean? As long as you leave the Name field in your query with the phrase "Group By" on the Totals line, it will show the totals for each member, just like you show above.

  5. #5
    Analogkid is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    27
    It shows like below.
    Name: Hour worked: Wage: Total:
    John 2 $10 $20
    John 4 $10 $40
    John 2 $10 $20
    Sam 2 $20 $40
    Sam 1 $20 $20.
    TOTALS 11 $140

    maybe it is the way I'm running my query?
    Do I need to run a seperate query to filter each person?

  6. #6
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    There are a few different ways to approach this.

    One is to do an Aggregate Query by person, to get the totals by person, and then use that as the basis (Control Source) of your Report.
    Another way would be to add Groupings to your Report (grouping by Name), and calculate the individual subtotals in the Group Footer section, and the grand totals in the Report footer section.

    There are tons of tutorials on Aggregate Queries that you can find with a simple Google search. I highly recommend checking some out, so you learn how to do them. Here is one: http://www.youtube.com/watch?v=60o0hRUfBHs
    You may also want to do a Google search on doing calculations in Report Group Footers, if you do not know how to do that. Once again, there is a lot of information out there on that.

  7. #7
    Analogkid is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    27
    Thanks Joe! I haven't messed with Aggregate query or grouping so I will check into it. Thanks for the info!

  8. #8
    Analogkid is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    27
    Hey Joe! I got this to work perfectly with the Grouping and Totals. Exactly what I was looking for. THANK YOU!! I’m still learning and getting better.
    This video helped a lot http://www.youtube.com/watch?v=KwX0xovCUwo

    Thanks for leading me to the right direction.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 27
    Last Post: 08-14-2012, 09:05 AM
  2. Replies: 7
    Last Post: 08-02-2012, 07:31 AM
  3. Totals Query for Report
    By SpdRacerX in forum Queries
    Replies: 3
    Last Post: 05-01-2012, 02:25 PM
  4. Replies: 5
    Last Post: 12-06-2011, 11:18 AM
  5. Totals in a query-based report
    By babylikesburgh in forum Reports
    Replies: 4
    Last Post: 02-24-2010, 03:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums