I have need to open an access 97 application from an Access 2002 application and turn control over to it until closed.
I thought I was on the right track with the following, but I keep getting an error.
****START CODE
Private Sub Command0_Click()
Dim appAccess As Access.Application
Set appAccess = CreateObject("Access.Application.9")
Select Case Frame1
Case 1
strDB = "C:\My Documents\Newdb1.mdb"
Case 2
strDB = "C:\My Documents\Newdb2.mdb"
Case 3
strDB = "C:\My Documents\Newdb3.mdb"
Case Else
MsgBox "Select office location then try again."
Exit Sub
End Select
' Open database in Microsoft Access window.
appAccess.OpenCurrentDatabase strDB
' Get Database object variable.
Set dbs = appAccess.CurrentDb
End Sub
****END CODE
The error I get is
-214023151
"Procedure Number is out of range"
Suggestions PLEASE and Thank you
ssecca
I thought I was on the right track with the following, but I keep getting an error.
****START CODE
Private Sub Command0_Click()
Dim appAccess As Access.Application
Set appAccess = CreateObject("Access.Application.9")
Select Case Frame1
Case 1
strDB = "C:\My Documents\Newdb1.mdb"
Case 2
strDB = "C:\My Documents\Newdb2.mdb"
Case 3
strDB = "C:\My Documents\Newdb3.mdb"
Case Else
MsgBox "Select office location then try again."
Exit Sub
End Select
' Open database in Microsoft Access window.
appAccess.OpenCurrentDatabase strDB
' Get Database object variable.
Set dbs = appAccess.CurrentDb
End Sub
****END CODE
The error I get is
-214023151
"Procedure Number is out of range"
Suggestions PLEASE and Thank you
ssecca