Results 1 to 5 of 5
  1. #1
    Carbontrader is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    12

    Totalling group footer fields

    I have a report in which I total the hours and costs spent to date from a large number of timekeeping records. I don't print the records (there are several thousand), just the total of the records for each subproject. I do this by turning off displaying of the detail fields, displaying just the sum([Quantity]) and sum([Amount]) for the total hours and $ respectively for each subproject in the subproject group footer. Works just fine.

    I want to compare these sums with the budgets for each subproject. Budgets are contained in a separate table. The budget table and the timekeeping table are linked by the subproject code in a query. I introduce the budget amounts into the report by placing the relevant budget fields from the query into the subproject group footer. Again, works just fine. I can calculate stats on each subproject: % hours used, % $ used, amounts remaining etc.

    Problem I'm having is that I can't total the subproject budgets. The query lists the subproject budget at every timekeeping record, so the totals are humungous!

    Is this an easy fix, or is my whole approach flawed?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    If you don't care about detail records, maybe better to do a saved aggregate (Totals) query grouped on subproject then join the budget table to that query and use as report Recordsource. The alternative might be a DLookup to the budget table.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Carbontrader is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    12
    The saved aggregate query you describe sounds like the right approach. Can I build one within Access or is it a SQL construct? I'm not a particularly sophisticated user...

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    Use the query builder. Create a SELECT query then click the Totals button from ribbon. Access Help has more info on using the query builder.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Carbontrader is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    12
    Your idea of using Dlookup made me look into using aggregate functions. I ended up changing the RecordSource for the report to the Budget table, and using the Dsum function to total the cost from the detail timekeeping table.I don't need to use a query at all! Thanks for the tip.

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

Similar Threads

  1. Replies: 2
    Last Post: 12-21-2013, 02:09 PM
  2. Replies: 6
    Last Post: 10-02-2013, 11:32 AM
  3. Counting/totalling non-numeric fields
    By mpreston14 in forum Queries
    Replies: 2
    Last Post: 09-20-2013, 07:21 AM
  4. Replies: 2
    Last Post: 06-21-2012, 07:40 PM
  5. Replies: 5
    Last Post: 06-07-2010, 12:20 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