The following code opens a database called "Design_Guide.mdb" from within another database i.e. it kicks off another independent access application.
This worked fine ( also works for excel and word etc ) until I used a subform in the form displayed at startup.
If I step through the code the database is opened but when the function ends the database disappears. The database operates normally if I open it in its own right from Windows, it also runs fine if I delete the subform.
The trouble is I want to use a subform. Does anybody know what's going on ?
Function Design_Guide()
Dim AccessFile As String
Dim AppAccess As Object
AccessFile = MasterRootDirectory & "\Design_Guide\Design_Guide.mdb"
Set AppAccess = GetObject(AccessFile)
AppAccess.Application.Visible = True
SendKeys "%( X)", False
End Function
DB1 -----) open design_guide ( no subform ) ----- works
DB1 -----) open design_guide ( with subform ) ----- disappears
This worked fine ( also works for excel and word etc ) until I used a subform in the form displayed at startup.
If I step through the code the database is opened but when the function ends the database disappears. The database operates normally if I open it in its own right from Windows, it also runs fine if I delete the subform.
The trouble is I want to use a subform. Does anybody know what's going on ?
Function Design_Guide()
Dim AccessFile As String
Dim AppAccess As Object
AccessFile = MasterRootDirectory & "\Design_Guide\Design_Guide.mdb"
Set AppAccess = GetObject(AccessFile)
AppAccess.Application.Visible = True
SendKeys "%( X)", False
End Function
DB1 -----) open design_guide ( no subform ) ----- works
DB1 -----) open design_guide ( with subform ) ----- disappears