Results 1 to 4 of 4
  1. #1
    edmscan is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2014
    Posts
    168

    Determining the actual running time of external application in Access

    I would like to do the following ..



    I want to run an external application (a batch file) ... and want to run it by clicking on a command button on a form. That part is all fine, using the Shell command. I can determine the start time of the application (also fine with now() function) .. but want to find out how long the external application ran and log that "run time" into my database.

    The part I don't know about is the .. really the ending time. How do I determine how long the application really ran for / ended ? I imagine I can use datepart to determine the difference in the start and end times. Or would I use a timer control. (but I cannot find the timer control in Access 2010).

    Thanks

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Here are 2 examples;
    GrandTotal: DateDiff("n",[StartTime],[EndTime])/60
    For the Timer Function, you could use a module or code via the form using the OnTimerEvent.
    Log the time when the counter started and when it finished.

    HTH

  3. #3
    edmscan is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2014
    Posts
    168
    I found an example from Access 2007 that works .. with a bit of a tweak it will work for me. But thank for the above .. and yes I did mean DateDiff above not DatePart.

  4. #4
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Glad you got it sorted out. Good Luck With Your Project.

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

Similar Threads

  1. Replies: 11
    Last Post: 05-20-2014, 11:32 AM
  2. Replies: 4
    Last Post: 04-01-2014, 03:56 PM
  3. Replies: 3
    Last Post: 11-06-2013, 01:59 PM
  4. Determining the value of 3 Date/Time Boxes....Newbie
    By REAbernathy in forum Programming
    Replies: 3
    Last Post: 09-12-2012, 12:05 PM
  5. Replies: 1
    Last Post: 06-09-2012, 05:27 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