作者: tmtony 时间: 2012-12-23 12:07
试试这个: DoCmd.TransferDatabase LinkType, "ODBC 数据库", "ODBC;DSN=" & DSNStr & ";SERVER=" & IPStr & ";DATABASE=" & DSNStr & ";UID=" & ODBCUser & "WD=" & ODBCPass, acTable, TableName, TableName, False, True
或 http://www.office-cn.net/forum.p ... base%2B%C3%DC%C2%EB作者: sxgaobo 时间: 2012-12-23 12:43 本帖最后由 sxgaobo 于 2012-12-23 12:45 编辑
搞定。谢谢tmtony andymark !!!
Dim db As Database
Dim strPath As String
strPath = "D:\备份.mdb"
Set db = DBEngine.Workspaces(0).OpenDatabase(strPath, False, False, "MS Access;pwd=123456")
DoCmd.TransferDatabase acExport, "Microsoft Access", strPath, acTable, "表", "表8", False
db.Close
Set db = Nothing