试试这个: 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
搞定。谢谢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