Results 1 to 5 of 5
  1. #1
    LaughingBull is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Location
    Toledo Ohio
    Posts
    143

    Question calculations in 3 different reports

    I have an attendance table and query that stores data and the query removes duplicates. each year there are 3 reports. Jan to June, July to Dec and Jan to Dec. what I want to calculate is the difference in the total attendance from the 2 6month reports and the one year report. example Mary attends the Jan to June and on that report she count as 1 attendee. and she attends the July to Dec she counts as 1 attendee but for the year report she only counts as 1 attendee. "Now the meetings are once a week and attendance is entered after every meeting so there is a total of 52 entries for Mary and the query removes the duplicates to show only one in each report." If you add the 2 6 month report totals she counts as 2. I want to add the 2 6 month report totals and subtract the total from the year report to show the difference and the difference will be the number of duplicates. My thought is how to store the totals data from each 6 month and the one year report report in a table, then run a report from that table to show the totals and the difference. Now this all has to be done with the click of a cmd button. i could do this myself but I am just the creator of this DB and will not be a user and the users have no idea how to make this happen.


    Thank you for your ideas and help

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    Well given that you state you can do this yourself - - then once that is established what you want to do is set up a macro that will fire the sequence of queries/reports that achieves the goal.

    The macro - while something to avoid in most cases - is in fact quite a good tool to set up a sequence of events to fire (i.e. action queries, open report, etc). Save the macro with a name.... and then at your command button you can set it up to fire the macro.

  3. #3
    LaughingBull is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Location
    Toledo Ohio
    Posts
    143
    Sorry, I should have stated that i am very rusty with code as it was 20 years ago that I learned Access and I never used macros only code so I need help with either a macro or code to do so.

  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,962
    Usually best not to store aggregate data in table. Build queries that do the summations. Build report, possibly with subreports, to display the queries. Do calcs on report for the difference. Writing the summary data to temp table will require more complex VBA.

    Not really understanding your calcs. Seems like the 1-year report totals will always be half of the 2 6-month reports summed.
    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
    LaughingBull is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Location
    Toledo Ohio
    Posts
    143
    thanks and that is correct but not always half that was just a simple example.

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

Similar Threads

  1. Calculations In Reports
    By Njliven in forum Reports
    Replies: 10
    Last Post: 07-04-2015, 04:13 AM
  2. Calculations in Reports - Nightmare!
    By PappyEnza in forum Reports
    Replies: 2
    Last Post: 06-16-2014, 02:05 PM
  3. Calculations on reports
    By holysepulchre in forum Reports
    Replies: 5
    Last Post: 01-10-2013, 02:35 PM
  4. Calculations on reports
    By BigMac4 in forum Reports
    Replies: 3
    Last Post: 09-14-2012, 02:33 PM
  5. Calculations in reports
    By bvanscoy678 in forum Reports
    Replies: 4
    Last Post: 08-05-2010, 06:27 AM

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