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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open database from within another

Status
Not open for further replies.

hirenJ

Programmer
Dec 17, 2001
72
GB

HI all, I am using this code to open another database from within the current database -- this action happens in response to a user click -- However, every time I run the code it says "file not found." the file is infact in the same directory as the calling database...

Is this code correct?

Hj
_______________________________________________
Public Sub openDB()

Dim wrkJet As Workspace
Dim dbLabels As Database



' Create Microsoft Jet Workspace object.
Set wrkJet = CreateWorkspace("", "admin", "", dbUseJet)

' Open Database object from saved Microsoft Jet database
MsgBox "Opening Interface...", vbInformation
Set dbLabels = wrkJet.OpenDatabase("Labels.mdb")


End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top