Sub CopyTable()
Dim sDBFromPath As String, sDBToPath As String
Dim dbTo As DAO.Database
Dim sSQL As String, MIO_DB As String
MIO_DB = “tracciato_19-25ottobre2009_finale”
sDBFromPath = “C:APPLICAZIONItracciato_19-25ottobre2009.mdb”
sDBToPath = “C:APPLICAZIONIMonitoraggio integrato.mdb”
Set dbTo = DBEngine.OpenDatabase(sDBToPath)
sSQL = ” SELECT * INTO PREL_DA_ACCODARE FROM ” & MIO_DB & ” IN ‘” & sDBToPath & “‘”
Debug.Print sSQL
dbTo.Execute sSQL
End Sub
error in query!!!!!!!!
Why?
In effect i want to copy in “one shot only” all records from “C:APPLICAZIONItracciato_19-25ottobre2009.mdb”
table “tracciato_19-25ottobre2009_finale” into “C:APPLICAZIONIMonitoraggio integrato.mdb” table PREL_DA_ACCODARE
Note:
The name of each fields in the two table are different but the number of fileds are the same.
I’m sure the path of mdb and the name of table correct.
peraph with ADo i can solve?
other way are welcome