I don't know if this can be done, but I want to provide a button for users to be able to start a 2nd session of access opening an 2nd existing database from the current database they are using. I would like the user to return to the original database when finished. I would use one database but the second database has a different set of users that I do not want in the first database.
This is how far I have gotten.
Private Sub Command1_Click()
On Error GoTo Err_Command1_Click
Dim mywrk As DAO.Workspace
Dim mydb As DAO.Database
Dim mydbname As String
mydbname = "P:\Operations\Eng-Ops\PMI Process\PMI System Database\PMI Process Database v4.mdb"
Set mywrk = DBEngine.CreateWorkspace("Testwrkspace", "admin", ""
Set db = DBEngine.OpenDatabase(mydbname)
DoCmd.OpenForm "Start Form", acNormal, , , acFormPropertySettings
Exit_Command1_Click:
Exit Sub
Err_Command1_Click:
MsgBox Err.Description
Resume Exit_Command1_Click
This is how far I have gotten.
Private Sub Command1_Click()
On Error GoTo Err_Command1_Click
Dim mywrk As DAO.Workspace
Dim mydb As DAO.Database
Dim mydbname As String
mydbname = "P:\Operations\Eng-Ops\PMI Process\PMI System Database\PMI Process Database v4.mdb"
Set mywrk = DBEngine.CreateWorkspace("Testwrkspace", "admin", ""
Set db = DBEngine.OpenDatabase(mydbname)
DoCmd.OpenForm "Start Form", acNormal, , , acFormPropertySettings
Exit_Command1_Click:
Exit Sub
Err_Command1_Click:
MsgBox Err.Description
Resume Exit_Command1_Click