Results 1 to 9 of 9
  1. #1
    ry94080 is offline Novice
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jul 2019
    Posts
    29

    "Kill" specific Access instance

    Hi all,

    I have two MSACCESS.EXE instances running on a machine. I'm looking to "Kill" one of the specific access databases.

    Anyone have any ideas on how i can do this via VBA?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    there is, but how's it gonna know which access to kill?
    say both apps are 'my db".

  3. #3
    ry94080 is offline Novice
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jul 2019
    Posts
    29
    Quote Originally Posted by ranman256 View Post
    there is, but how's it gonna know which access to kill?
    say both apps are 'my db".
    I would like to "Kill" the Access application that has the title "Report Runner".

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    How was report runner opened? From explorer? Another app? If the latter you should be able to just close the db from the app that opened it

    Mydbinstance.close

  5. #5
    ry94080 is offline Novice
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jul 2019
    Posts
    29
    Quote Originally Posted by Ajax View Post
    How was report runner opened? From explorer? Another app? If the latter you should be able to just close the db from the app that opened it

    Mydbinstance.close
    It's opened manually. However, i have another DB that monitors it to make sure it is running on schedule.


    Sometimes its hangs up. When it hangs up and the other DB that monitors is detects the hang up, i was hoping to kill the Report Runner then restart it. Right now the DB that monitors it just notifies us and we restart it manually. Hoping to automate the restart process.

  6. #6
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    I'm not aware of any code that will 'kill' a specific instance of access, just all of them which I'm guessing you have already found.

    Aside from not being able to get the name of the instance, all you can get is a number - (see task manager). you would need to dig down to find the name (aka clicking the down arrow next to each instance of access).

    Not gone through it but you might find something in this thread

    https://www.access-programmers.co.uk...rocess.321768/

  7. #7
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,114
    Maybe this might help (from http://forestbyte.com/vba-code-samples/):

    Cheers,
    Vlad
    Attached Files Attached Files
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  8. #8
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    @vlad - your link is a bit twisted - missing the s on https and has ): at the end

  9. #9
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,114
    @Ajax: thanks, we are traveling and I'm not that good with the phones (and lack of good light\glasses)..:

    http://forestbyte.com/vba-code-samples/
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

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

Similar Threads

  1. Replies: 5
    Last Post: 04-22-2019, 08:55 PM
  2. Replies: 12
    Last Post: 10-01-2018, 02:40 PM
  3. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  4. Replies: 1
    Last Post: 02-05-2015, 05:41 PM
  5. Replies: 2
    Last Post: 10-10-2012, 02:51 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