Check Access App Is Running

paulmcdonnell

Ready to Help
Local time
Today, 18:07
Joined
Apr 11, 2001
Messages
167
Hi Guys,


It's been a few months since I've used the forum as i've been doing some outlook development work. I've now sarted linking my access program to outlook in a big way.

One thing I can't find and I'm not sure how to do is run a check to see if my database is open and running with code.

I'm gonna use this from outlook to check if Access is open and if my database is running.

I can't find this in the forum...Does anyone have any ideas...

Cheers guys

Paul McDonnell
 
You could check for the ldb thats created when a users in the database. and if exists statement would work however you would not know if it was doing somthing.
 
Let me know if that ldb file search does not work and i can get you the API code to see if a program is running or not.

-nate
 
Yep, Having a bit of trouble with this can you post that code.

Very much appreciated


Cheers

Paul
 
Code:
Option Compare Database
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
           ByVal lpClassName As String, _
           ByVal lpWindowName As String _
) As Long

Private Sub Command0_Click()
'appName should be equal to what your applications name is in the taskmanager

Dim appName As String
appName = "Microsoft Access"

    If FindWindow(vbNullString, appName) Then
        MsgBox "loaded"
    Else
        MsgBox "not loaded"
    End If
End Sub

Ask if any questions.
 

Users who are viewing this thread

Back
Top Bottom