How to Setup Access 2003 DB as Single Instance App

S

Stephen

What is the best way to make my DB a single instance application? In other
words, the DB will only let the user open the DB once. If they try to open a
second instance, it notifies them that it is already open.

Thanks
Stephen
 
J

John Spencer

Take a look at
http://www.groupacg.com/

Click MS Access Code and Design Tips
Click How to Determine if an Instance of the application is already running
on the computer

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
S

Stephen

John,

I put this code in my switchboard form and then ran it in the Form Open
event. It works great in the mdb, but when I convert it to a mde, the
function does not detect and close multiple instances. Should I put the code
somewhere else? Other ideas?

Thanks
 
S

Stephen

John,
I was able to make it work by using this code in the form_open event:

If IsRunning = -1 Then
MsgBox "<my application> is already open.", vbOKOnly
Application.Quit
End If

Thanks for the help and quick response!

-Stephen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top