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!

More than one instance open on same Database

Status
Not open for further replies.

southboy

Programmer
Oct 23, 2002
26
US
I have a database I use. If the database is open and the shortcut icon is clicked again, another instance of the same database is open, so now you have two instances of the same database open. If you enter information in one, it is not reflected in the other until it is closed and reopened.

Also, if you enter information in one instance of the DB, then enter information in the other instance of the DB; the one that is closed last is the one that retains the information because it was saved last.

Is there a switch or parameter to set either on the desktop icon or in MS Access to bring up only one instance of the DB and if the icon is clicked again, bring the already open database to the foreground and not open another instance of the same database?
 
There is the /excl command line switch.

There's also the notion of using a front-end/backend.
--Jim
 
Thank you jsteph. That does do the trick some what.
It stops another instance of the DB opening with the MS Access application opening and producing an error that has to be answered and then the MS Access application closes.

Do you mean in using a front-end/backend, to split the database? I have some databases like that but can still open more than one instance on those also.

On some applications, if you start another instance, it brings the existing running application to the front. I was hoping there was a way MS Access could do that also.

Thank you for your help!
Southboy
 
Southboy,
There may be an easy way to do what you want--bring the open instance up front, but the only way I've done that in the past is to use a proxy .exe file.

This is where I build a small VB6 module that uses some API's to find the specific app window, if it fails then I use ShellExecute() to open an initial instance.
--Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top