A better way is the [free] TSI SOON (Shut One, Open New) Database add-in,
fom the utilities page at:
http://www.trigeminal.com/
--
MichKa
the only book on internationalization in VB at
http://www.i18nWithVB.com/
Quote:
> Craig,
> There are a few ways...
> Probably the easiest is to use send keys...
> Function fOpenDB(strDBName As String)
> 'On Error Resume Next
> SendKeys "%FO" & strDBName & "~"
> End Function
> Or
> Sub OpenDB()
> Dim appAccess As Access.Application
> Set appAccess = New Access.Application
> With appAccess
> .OpenCurrentDatabase "c:\Access\Templates.mdb"
> .Visible = True
> End With
> Set appAccess = Nothing
> End Sub
> Otherwise look at CreateObject and GetObject in help for examples.
> Hope this helps,
> James
> > Anyone know how to open another Access file from within an
> > Access database? I would like to be able to do this from
> > a click event on a command button. I'm guessing that the
> > click event would first close the current database, then
> > open the new file??? I don't know.
> > I don't think the OpenDatabase method accomplishes what I
> > want to do.
> > Thanks.
> > C