Results 1 to 8 of 8
  1. #1
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Nevada, USA
    Posts
    207
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to Check for Running Process? (Access 2000/2002)

    This may be in the wrong forum but I'll start here. It may belong in the VB/VBA forum.

    I am running an Access (2000 or 2002) app under Win 2K Pro. How can I use VBA to check if another process (the process name is known) is running at the time my app is running?

    Thanks.
    Carol W.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: How to Check for Running Process? (Access 2000/2002)

    If it isn't Access-specific VBA, it could have been posted in either board. When you say "process", are you talking about one of the other Office apps, or something else, or are you talking about another session of Access being open at the same time? There is a Windows API call, EnumProcesses, that will allow you to get an array of identifiers for active processes on a system, but it requires NT 4 or above and doesn't support Windows ME. If you get more specific, maybe someone can give you a better answer.
    Charlotte

  3. #3
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Nevada, USA
    Posts
    207
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to Check for Running Process? (Access 2000/2002)

    Thanks for the reply.

    I am looking to see if a non-Office app is running. It is a third party API that needs to be running to send transactions out to a service. If it has been canceled for some reason, I need to inform the user about that situation.
    Carol W.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: How to Check for Running Process? (Access 2000/2002)

    Then are you running a version of Windows that supports the EnumProcesses call?
    Charlotte

  5. #5
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Nevada, USA
    Posts
    207
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to Check for Running Process? (Access 2000/2002)

    Yes, as I indicated in my initial post, the app runs under Win 2K Pro.

    Thanks.
    Carol W.

  6. #6
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Nevada, USA
    Posts
    207
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to Check for Running Process? (Access 2000/2002)

    For anyone who is interested, I did a search in Google Groups and found the solution to my problem in this article. I've modified it slightly to suit my purposes. It works quite well.
    Carol W.

  7. #7
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: How to Check for Running Process? (Access 2000/2002)

    Sorry, I missed that in your first post. In that case http://www.allapi.net has both the declarations and sample code for using EnumProcesses.
    Charlotte

  8. #8
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Nevada, USA
    Posts
    207
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to Check for Running Process? (Access 2000/2002)

    Thanks for the link. I've already gotten my solution but I will make a note of this site for future referernce. It seems like an excellent resource.
    Carol W.

Posting Permissions

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