Results 1 to 4 of 4
  1. #1
    imintrouble is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Location
    Missouri, where frownin's a sport
    Posts
    127

    Total Time box

    Hello! I have created a report which returns the information I need, how i want it. However my question is this:



    Because I have a field called Hours Worked, it records the time in the format "# hours, # minutes, # seconds", with the # being the actual numbers. I need one text box located just below this field stating the total time recorded so far. so this would mean adding the time like this:

    4 Hours, 3 Minutes, 27 Seconds
    6 Hours, 57 Minutes, 33 Seconds


    Total Hours: 11 Hours

    of course if the time doesn't line up to a perfect amount of hours, thats ok, i was just being creative.

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    I'm not all that great with Access reports, but try the DSum() function.

  3. #3
    imintrouble is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Location
    Missouri, where frownin's a sport
    Posts
    127
    from what i've seen of DSum(), it would work fine up until the last point of the criteria which must be met. Because my information is in number then string ( 4 Hours ) form, I'm not sure how to create any criteria of how to make this work.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    You are in trouble.

    That is not a good way to store the time; I'd have one numerical field representing the number of seconds, and the rest can be derived from that (10,000 seconds is x hours, y minutes and z seconds).

    To keep it in the format you have it, I suspect you're going to have to create a function to parse out the values, get them to a common denominator, add them up, then parse them back out to the desired format. It won't be simple.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Sub-total Help
    By DJohns in forum Reports
    Replies: 2
    Last Post: 08-18-2011, 11:57 AM
  2. Replies: 7
    Last Post: 08-04-2011, 07:49 PM
  3. Time: How to increment time in form
    By dek in forum Forms
    Replies: 1
    Last Post: 05-07-2011, 12:47 AM
  4. Replies: 12
    Last Post: 02-22-2011, 03:39 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