Function OpenDb()
Dim WS As DAO.Workspace
Dim DB As DAO.Database
DBEngine.SystemDB = CurrentProject.Path & "\wrkgrp.mdw"
Set WS = DBEngine.CreateWorkspace("name", "Admin", "", dbUseJet)
Set DB = WS.OpenDatabase(CurrentProject.Path & "\db.mdb", False, False, ";pwd=00")
MsgBox "открыли"
DB.Close
WS.Close
Set WS = Nothing
Set DB = Nothing
End Function
|