LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Delete Table from Excel

I'm trying to delete an access table from Excel.
When I try and delete the table using VBA this message appears:
"Cannot delete this index or table. It is either the current index or
is used in a relationship."
But there is no relationship with this table.
I can delete the table in access with no problem but I need to do it in
VBA.

I have tried to delete the tables by using these two methods.

strSQL = "DROP TABLE tblPrices;"
cnnX.Execute strSQL

vtSql = "DROP TABLE tblPrices"
cmd.CommandText = vtSql
cmd.Execute

Thanks

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete Table Names Treasur2 New Users to Excel 2 July 28th 08 09:51 PM
Delete a Table Name in Excel 2007 Name Manager Gos-C Excel Discussion (Misc queries) 0 January 14th 07 01:53 PM
Delete Pivot table hurriance[_5_] Excel Programming 1 June 15th 06 09:07 AM
ODBC Oracle Table, Delete From Excel? nowon Excel Programming 2 December 22nd 05 03:38 PM
Delete Pivot Table sapta Excel Programming 0 September 10th 03 05:07 AM


All times are GMT +1. The time now is 06:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"