You can't do it within the same Access session. So you can shell out to
open another session.
See
http://www.access.qbuilt.com/html/custom_login.html
for an example to open another database.
--
Joan Wild
Microsoft Access MVP
rhann wrote:
> I want to close a database and reopen it with certain command line
> options ("C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
> "c:\finalproject\sjacadets.mdb" /wrkgrp c:\finalproject\system.mdw)
> it has to be able to be run from a button, can anyone help?
>
> and I haved also got this bit of code can anyone help me stick the two
> together
>
> Dim sCommand as String, lTaskID as long
> sCommand = """" & SysCmd(acSysCmdAccessDir) & "msaccess.exe """ _
> & CurrentDb.Name & """ /wrkgrp:""" &
> SysCmd(acSysCmdGetWorkgroupFile) _ & """" ' and add any other
> switches you require here
> lTaskID = Shell(sCommand, vbMaximizedFocus)
> If lTaskID <> 0 Then AppActivate lTaskID
> DoCmd.Quit