Results 1 to 10 of 10
  1. #1
    Join Date
    Nov 2013
    Location
    Springville, CA
    Posts
    5

    Importing into access from non-access program


    Is it possible to enter values from a non-ms access program into ms access? Specifically, I would like to import times from a running clock (not in ms access) into an access application. This is for a race timing application. Is this possible?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Probably not directly unless the clock program uses a database that Access can connect to.

    Does this clock program have a feature to save data?
    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
    Join Date
    Nov 2013
    Location
    Springville, CA
    Posts
    5
    Quote Originally Posted by June7 View Post
    Probably not directly unless the clock program uses a database that Access can connect to.

    Does this clock program have a feature to save data?
    At this point I don't have a specific clock program in mind. There are several available in shareware or for inexpensive downloads. According to their documentation, you can capture times from the clock into excel, but not access. I'm just curious why times wouldn't be available in access.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    They are probably describing available formats for exporting data. Once the data is exported you can import it into Access.

    You might not find an off the shelf solution that you will be able to link to or connect to in order to query real time data.

  5. #5
    Join Date
    Nov 2013
    Location
    Springville, CA
    Posts
    5
    Quote Originally Posted by ItsMe View Post
    They are probably describing available formats for exporting data. Once the data is exported you can import it into Access. You might not find an off the shelf solution that you will be able to link to or connect to in order to query real time data.
    How about this approach? Is it possible to call up & run an external program from within access. For example, could I have a text box in a form, and have the access application call up and run the external clock program in that text box?

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    That is possible. Using VBA, you can launch other applications. However, there will most likely be limitations to what Access can have the application do. Simply opening an application is not a big deal. Opening a third party app and interacting with it is another story.

    It may be easiest to build your own clock application

  7. #7
    Join Date
    Nov 2013
    Location
    Springville, CA
    Posts
    5
    Quote Originally Posted by ItsMe View Post
    That is possible. Using VBA, you can launch other applications. However, there will most likely be limitations to what Access can have the application do. Simply opening an application is not a big deal. Opening a third party app and interacting with it is another story.

    It may be easiest to build your own clock application
    What would a vba line look like to run an .exe file?


    One other thought, I know it's easy to get a date/time at any moment in access. Is it possible to get a date/time that records the time in hundredths of a second?

    I do appreciate the responses!

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Bing: Access vba shell open application

    Review http://www.utteraccess.com/wiki/inde...es_From_Access

    Bing: Access time hundredths

    http://www.error-exception.org/artic...dths+of+second

    Bing: Format time hundredths

    http://www.office-archive.com/4-exce...eb3ae70867.htm
    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.

  9. #9
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by rick_from_springville View Post
    What would a vba line look like to run an .exe file?
    This is an example of code that opens a specific file. This looks a lot like what a shortcut on your desktop would if you looked at its properties. I believe it will open the app if you simply leave out the file path. Look at some shortcuts that you want to mimick.

    Code:
    Dim strAppName as String
    stAppName = "C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe \\ServerName\FolderName\FileName.pdf"
    Call Shell(stAppName, 1)
    System time does return in fractions of a second as long as you are not calling VBA script to a Macintosh.

    You can try out this timer. I have not tested it. But it should return the current time, showing only the seconds. I just put it together to test the fraction theory. You should be able to call it with Call dblCount(7.32654)

    Code:
    Function Timer(dblCount As Double)
    Dim dblTarget As Double
    dblTarget = DateAdd("s", dblCount, Now)
    While DateDiff("s", Now, dblTarget) > 0
    Wend
    MsgBox "Current time showing only seconds = " & dblTarget
    End Function
    Last edited by ItsMe; 11-17-2013 at 11:32 AM. Reason: it's not a stopwatch it's a timer

  10. #10
    Join Date
    Nov 2013
    Location
    Springville, CA
    Posts
    5
    Thanks to all for your suggestions. You've given me a lot to work with. I'll let you know how it goes!


    Quote Originally Posted by ItsMe View Post
    This is an example of code that opens a specific file. This looks a lot like what a shortcut on your desktop would if you looked at its properties. I believe it will open the app if you simply leave out the file path. Look at some shortcuts that you want to mimick.

    Code:
    Dim strAppName as String
    stAppName = "C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe \\ServerName\FolderName\FileName.pdf"
    Call Shell(stAppName, 1)
    System time does return in fractions of a second as long as you are not calling VBA script to a Macintosh.

    You can try out this timer. I have not tested it. But it should return the current time, showing only the seconds. I just put it together to test the fraction theory. You should be able to call it with Call dblCount(7.32654)

    Code:
    Function Timer(dblCount As Double)
    Dim dblTarget As Double
    dblTarget = DateAdd("s", dblCount, Now)
    While DateDiff("s", Now, dblTarget) > 0
    Wend
    MsgBox "Current time showing only seconds = " & dblTarget
    End Function

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

Similar Threads

  1. Replies: 5
    Last Post: 01-07-2016, 12:49 PM
  2. Old Access Program issues
    By Melicious in forum Access
    Replies: 1
    Last Post: 10-18-2012, 08:22 PM
  3. Program a 30-day trial into my Access Program?
    By genghiscomm in forum Programming
    Replies: 1
    Last Post: 05-26-2011, 02:14 PM
  4. Is Access the right program for me?
    By Cole in forum Access
    Replies: 1
    Last Post: 08-07-2010, 08:47 AM
  5. Access chat program
    By cuneyt in forum Programming
    Replies: 1
    Last Post: 09-08-2009, 02: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