By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,882 Members | 2,465 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,882 IT Pros & Developers. It's quick & easy.

Importing in Access creating dublicate table

P: 62
I was given a database program in Access to improve. This included enabling an exported table in excel which after update should be able to import back into the previous table.
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
  1.     Set DBBsc = DBEngine.Workspaces(0).Databases(0)
  2.     Set QBsc = DBEngine.Workspaces(0).Databases(0)
  3.     Set QBsc = DBBsc.CreateQueryDef("", "DELETE * FROM [T_GLobal tracking]")
  4.     QBsc.Execute
  5.     QBsc.Close
  6.     DBBsc.Close
  7.     Set QBsc = Nothing
  8.     Set DBBsc = Nothing
  9.     DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "[T_GLobal tracking]", "C:\GLobal tracking.xls", True
  10.     MsgBox "The Global tracking has been updated", vbOKOnly, "SITE TRACKING"
Jun 27 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.