Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open Access 97 DB from Access 2002 DB ???

Status
Not open for further replies.

ssecca

Programmer
Feb 13, 2002
219
0
0
US
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
 
Looks to me like you are trying to Open the Database in the wrong Version of access, as whenever you open an Access 97 DB in Access 2k+ you have to convert it to Access 2000, this is due to Access 2k using Jet 4 compared to Access 97 using Jet 3.51.

Have you tried converting the database to see if it works.

What are you trying to do with the Access 97 Database?
 
Unfortunatly I can not convert it. All our computers have BOTH Access 2002 and Access 97 installed. Depending on the application being opened the short cuts are directed to open the application using either 2002 or 97 as appropriate.

In this case we have a 2002 application that we want to place a button in so that when the 97 application is needed we would simple click the button and it would open. The old 97 application is being fased out and would take way to much time and resouces to convert.

So the bottom line is I need to start an access 97 unconverted application using a button in an Access 2002 application.
 
Yes, of course. Thank you that works fine. regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top