To include the wrkgrp switch, you'd use
Call Shell("""C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE""
""C:\MyDocuments\NameOf2ndDB.mdb"" /wrkgrp""C:\My
Documents\NameofWorkgroupFile.mdw""", 1)
(all on one line, of course).
You can use parameters along the lines of
Dim strExecutable As String
Dim strDatabase As String
Dim strSecurity As String
strExecutable = "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
strDatabase = "C:\MyDocuments\NameOf2ndDB.mdb"
strSecurity = "C:\My Documents\NameofWorkgroupFile.mdw"
Call Shell("""" & strExecutable & """"" " & _
"""" & strDatabase & """"" " & _
"/wrkgroup """ & strSecurity & """", 1)
You can set the 3 variables however you want. For instance, you might set
strExecutable using
strExecutable = SysCmd(acSysCmdAccessDir) & "msaccess.exe"
and you might allow the user to select the database using the standard
Windows File Open dialog (as illustrated in
http://www.mvps.org/access/api/api0001.htm at "The Access Web") (Of course,
if you let them select the database that way, you'll have an issue knowing
which workgroup file to use)