Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preventing multiple instances of a program being open 2

Status
Not open for further replies.

Toga

Technical User
Jul 21, 2000
234
US
I'm having an issue where users are sometimes opening multiple instances of the Access program on the same PC.

Is there a practical way to detect if the access program is already open on a given PC?

I'm using Access 2003, if that matters.

 
Have a look at this thread:

thread705-1389718
 
Thanks Remou, however I should have been more specific. I need to know if the same Access Application is already running on a PC. It's OK if a different Access Application is already running....I just don't want the same one.

 
Toga,
You can use the findwindow api, from within the access app. For this to work well, you need to control the titlebar text for the access app, which is what findwindow looks at. You look for instances of access with your dbname or your titlebar text, and if the opened intstance finds more than one, it kills itself with .quit.
--Jim
 
jsteph - Thanks...sounds like what I need. Can you point me in a direction on how to use or where I find the findwindow api. Access help doesn'tr return anything.
 
Thank You ByteMyzer and everyone else for your input. I dropped the code from the link ByteMyzer gave me into a module by itself and it worked like a charm the very first time I tried it!


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top