Access 97; need assistance on OpenDatabase
I have 2 databases, one called "legal" and one called "contract_review". When the user enters "legal", a form comes up which gives the user the option to go to the other database, eg contract_review...i created a button on the form and put the following code, intending to have the current database closed, the other database opened along with a particular form in that database...
Dim wsp As Workspace
Dim mydb As Database
CloseCurrentDatabase
Set wsp = DBEngine.Workspaces(0)
Set mydb = wsp.OpenDatabase("contract_review", , , "OBDC")
DoCmd.OpenForm ("Main_Entry")
The current database does close, but the form in the other database doesn't come up, indeed I'm not even sure at that point the other database is actually opened up...
Any suggestions? Thanks.
I have 2 databases, one called "legal" and one called "contract_review". When the user enters "legal", a form comes up which gives the user the option to go to the other database, eg contract_review...i created a button on the form and put the following code, intending to have the current database closed, the other database opened along with a particular form in that database...
Dim wsp As Workspace
Dim mydb As Database
CloseCurrentDatabase
Set wsp = DBEngine.Workspaces(0)
Set mydb = wsp.OpenDatabase("contract_review", , , "OBDC")
DoCmd.OpenForm ("Main_Entry")
The current database does close, but the form in the other database doesn't come up, indeed I'm not even sure at that point the other database is actually opened up...
Any suggestions? Thanks.