William Hindman
wdhindman at bellsouth.net
Thu Mar 13 13:38:01 CST 2003
...de nada ...but the thanks belong to AccessD, I just passed on what I had once been given by others here when I asked for help :) William Hindman "And so, my fellow Americans: ask not what your country can do for you - ask what you can do for your country. My fellow citizens of the world: ask not what America will do for you, but what together we can do for the freedom of man." John F. Kennedy, 1961 ----- Original Message ----- From: "Bob Gajewski" <bob at renaissancesiding.com> To: <accessd at databaseadvisors.com> Sent: Thursday, March 13, 2003 2:18 PM Subject: RE: [AccessD] (A97) Prevent multiple instances of Access > William > > Okay - I didn't have the "(True)" parameter. The code works perfectly now. I did make a modification to bypass giving the user an option: > > ****************************************************** > ' Original Code > ' If fConfirm Then > ' If MsgBox(sMyCaption & " is already open@" _ > ' & "Do you want to open a second instance of this database?@", _ > ' vbYesNo Or vbQuestion Or vbDefaultButton2) = vbYes Then Exit Function > ' End If > > ' Modified Code - The user will not be given a choice! > If fConfirm Then > If MsgBox("The National Jobs database is already open.", _ > vbOKOnly + vbExclamation) = vbYes Then Exit Function > End If > ****************************************************** > > Thanks so much! > > Bob > > > On Thursday, March 13, 2003 12:53 PM, William Hindman [SMTP:wdhindman at bellsouth.net] wrote: > > Bob > > > > ....just put "RunCode" in a macro Action line and "winCheckMultipleInstances > > (True)" in the Function Name line ...without the quotes of course ...HTH :) > > > > William Hindman > > "All it takes for evil to prevail is for good men to do nothing." Edmund > > Burke > > > > > > ----- Original Message ----- > > From: "Bob Gajewski" <bob at renaissancesiding.com> > > To: <accessd at databaseadvisors.com> > > Sent: Thursday, March 13, 2003 11:17 AM > > Subject: RE: [AccessD] (A97) Prevent multiple instances of Access > > > > > > > William: > > > > > > Thanks for the reply! I understand that this is a module called > > > "mdlCheckMultipleInstances", but I do not know how to call this directly > > > from the autoexec. Could you help me just a little more here? I hate to > > > impose, but I truly appreciate the assistance!! > > > > > > Thanks, > > > Bob > > > > > > On Thursday, March 13, 2003 10:27 AM, William Hindman > > > [SMTP:wdhindman at bellsouth.net] wrote: > > > > Bob > > > > > > > > ....I use the following code module that was passed to me on this list > > > long > > > > ago ...I call it in an autoexec ...it works for me regardless of the > > > app's > > > > windowed state ...either giving the user a msgbox if the second app is > > > > visible or restoring the first it if its minimized and then closing > > > ...HTH > > > > :) > > > > > > > > > > > > > _______________________________________________ > > > AccessD mailing list > > > AccessD at databaseadvisors.com > > > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > > > > > > > > _______________________________________________ > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > > > > > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com