Results 1 to 2 of 2

Thread: Need "Quit" and "Timer" commands, for Automatiing Access, from Excel..

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Posts
    222

    Need "Quit" and "Timer" commands, for Automatiing Access, from Excel..

    I need to Automate Access, from Excel and have Access automaticly quit, if it's left open, for more than two minutes.
    I'm somewhat familiar with automating word, from Excel, or Excel, from VB, but have never Automated Access.
    VB Code:
    1. Dim AccApp As Access.Application
    2. Set AccApp  = New Access.Application
    3. AccApp .OpenCurrentDatabase strPath
    4. AccApp.Run strMyprocedure
    5. 'some sort of timer, for pausing(accuracy, isn't important)
    6. 'close & quit(need command's for closing with, & without, saving)
    Thanks in advance

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: Need "Quit" and "Timer" commands, for Automatiing Access, from Excel..

    Code:
    accApp.quit
    Probably.

    Timer function I am not sure - you could eat resources and make a loop with a doevents bit in it. Then check whether access is still open and close it...
    You could open a small (very small) or hidden form in the access db and put a timer on the form (formtimer is a property) which closes itsself after (say) 5 mins.

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width