The issue is that the table name has a space. I tried putting it in brackets but this is causing it to be duplicated adding 1,2... to the end of the table name.
I tried changing the name but there are so many codes, macros and queries attached to this table.Please how can I use my code
the table name is "T_Global tracking".
This is my code:
Expand|Select|Wrap|Line Numbers
- Set DBBsc = DBEngine.Workspaces(0).Databases(0)
- Set QBsc = DBEngine.Workspaces(0).Databases(0)
- Set QBsc = DBBsc.CreateQueryDef("", "DELETE * FROM [T_GLobal tracking]")
- QBsc.Execute
- QBsc.Close
- DBBsc.Close
- Set QBsc = Nothing
- Set DBBsc = Nothing
- DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "[T_GLobal tracking]", "C:\GLobal tracking.xls", True
- MsgBox "The Global tracking has been updated", vbOKOnly, "SITE TRACKING"