Check for already running Access Application

crispyw

New member
Local time
Today, 21:57
Joined
Mar 19, 2010
Messages
2
Hi - I'm new to the forum so hope I've posted this correctly.

My problem is this

I have several different MS Access Applications, all used by different members of my team. To get access to these applications quickly I have built a simple 'switchboard' application with command buttons that open the various applications from a shared drive using the following code:

Private Sub Command6_Click()
Dim path As String
path = "G:\MEMBERSHIP RECORDS\Data Team\FORUM ARCHIVE\FORUM ARCHIVE.mdb"
Dim appAccess As Access.Application
Set appAccess = New Access.Application
appAccess.Visible = True
appAccess.Application.OpenCurrentDatabase (path)
End Sub

What I would like to do is to enhance this code to allow me to

1. Check whether the user already has that particular application open, and if so,

2. Set the windows view to it rather than opening another instance of the application.

e.g. if the user clicks the button to open an application, it will just set the view to the already running version, instead of opening another - my team are so used to the switchboard they keep finding they might have 4 or 5 instances of an application already open! I know they can find / close them using the taskbar, but thought there must be a way to code it so it doesn't happen.

Can anyone help? :confused:
 
Sarcasm accepted - thanks for pointing that out - However, I've been searching the web using the wrong keywords and finding nothing. Cheers. Chris ;)
 

Users who are viewing this thread

Back
Top Bottom