[AccessD] Close current database

jscott at mchsi.com jscott at mchsi.com
Tue May 6 11:02:05 CDT 2003


OK - thought it worked perfectly. Thanks to everyone for all the great 
examples! My problem is this - when I use the .closecurrentdb method it closes 
the currentdb and doesn't continue executing the code - although it seems that 
it should according to the documentation ... 

If I use the code below it opens the second db fine but the problem is that the 
second db is copying a file over the calling db then closing itself and 
reopening the calling db so the QUIT occurs after the first has been opened.

I know it's confusing. I've got all the rest to work except this one little 
thing!

Anyone help??????

> This works perfectly! Thank you so much! I would have never stumbled across 
> that myself. :)
> 
> --
> 
> Jeanine 
> > On 2 May 2003 at 7:29, Jeanine wrote:
> > 
> > > 
> > > I just can't get the darn thing to close itself and open another db.
> > > 
> > 
> > One way, of the top of my head would be:
> > 
> > Public Declare Function ShellExecute Lib "shell32.dll" Alias _
> > "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
> > ByVal lpFile As String, ByVal lpParameters As String, ByVal _
> > lpDirectory As String, ByVal nShowCmd As Long) As Long _
> > 
> > Sub OpenTheOtherOne()
> > 	ShellExecute(0,"Open","C:\Full\Path\To\YourSecondApp.mdb"","","",1)
> > 	DoCmd.Quit
> > End Sub
> > 
> > 
> > -- 
> > Lexacorp Ltd
> > http://www.lexacorp.com.pg
> > Information Technology Consultancy, Software Development,System 
> > Support.
> > 
> > 
> > 
> > _______________________________________________
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> 


More information about the AccessD mailing list