试试这个
Dim dbeTemp As DAO.DBEngine
Dim wsTemp As DAO.Workspace
Dim dbTemp As DAO.Database
Dim rstTemp As DAO.Recordset
Set dbeTemp = CreateObject("DAO.DBEngine")
dbeTemp.systemdb = "c:\windows\system.mdw"
dbeTemp.DefaultUser = "Admin"
dbeTemp.DefaultPassword = ""
Set wsTemp = dbeTemp.workspaces(0)
Set dbTemp = wsTemp.OpenDatabase("c:\tmtony.mdb")
Set rstTemp = dbTemp.OpenRecordset("tblEpdEmployee")