Results 1 to 5 of 5
  1. #1
    Alphix is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    61

    Please help on how to calculate total down time and total production run time from table????

    I am trying to calculate total down time and total production running time per employee. My table's field names are as follows:

    (ID) (User_Name) (Event) (Time_Stamp) (Down/Running)
    1 Mark Start Production 7:00:00 AM Running
    2 Jill Start Production 7:00:00 AM Running
    3 Rich Start Production 7:00:00 AM Running
    4 Mark Machine Failure 8:00:00 AM Down
    5 Rich Out of Parts 8:10:00 AM Down
    6 Mark Start Production 8:20:00 AM Running
    7 Jill Changeover 8:45:00 AM Down


    8 Mark Start Production 9:00:00 AM Running
    9 Rich Start Production 9:10:00 AM Running
    10 Jill Start Production 9:15:00 AM Running
    11 Mark Clock Out 12:00:00 PM Down
    12 Jill Clock Out 12:00:00 PM Down
    13 Rich Clock Out 12:00:00 PM Down

    Questions:
    (1) How do I create a selective query which calculates Mark's Total run time and Down Time?
    (2) How do I do the same for the others individually?
    (3) How do I create a form showing the accrued or total down time and run time as it happens?

    Please help, I need some ideas....

    Thank you.....
    Attached Files Attached Files

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    1st your TIME_STAMP needs to be DATE and TIME. It currenly only has TIME. Change the default setting for this field to NOW(). This will help separate work days too.

    But I will send code to calc elapsed time momentarily.

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Pulling data from another record of same table is tricky. Review http://allenbrowne.com/subquery-01.html#AnotherRecord
    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.

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    elapsetime.zip

    This saves elapsed time to a table, but DO put data and time in the TIME_STAMP field.

  5. #5
    Alphix is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    61
    A million thank yous. I will study your code to see how it works and gain some understanding.

    After I input the date and time, do you think I can also run it by date?

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

Similar Threads

  1. Replies: 5
    Last Post: 07-24-2014, 07:54 AM
  2. Replies: 8
    Last Post: 08-24-2012, 01:54 AM
  3. Total elapsed time
    By Craigind in forum Access
    Replies: 1
    Last Post: 05-14-2012, 03:54 AM
  4. Total Time box
    By imintrouble in forum Reports
    Replies: 3
    Last Post: 10-20-2011, 03:28 PM
  5. Need help with calculating Time total
    By Monoceros in forum Reports
    Replies: 1
    Last Post: 04-20-2009, 12:44 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