PC Review


Reply
Thread Tools Rate Thread

Delete a backend table

 
 
UnnurU
Guest
Posts: n/a
 
      16th Oct 2003
I must write VBA code to delete a Linked table; both the
frontend and the backend.
I use DoCmd.RunSql "Drop Table theTable" to delete the
frontend table.
Can someone advice me how to delete the backend table in
another database, by using VBA?

Thanks UU
 
Reply With Quote
 
 
 
 
Marshall Barton
Guest
Posts: n/a
 
      16th Oct 2003
UnnurU wrote:

>I must write VBA code to delete a Linked table; both the
>frontend and the backend.
>I use DoCmd.RunSql "Drop Table theTable" to delete the
>frontend table.
>Can someone advice me how to delete the backend table in
>another database, by using VBA?


Dim dbFE As Database
Dim dbBE As Database
Dim strBEpath As String
Dim strBEtable As String

Set dbFE = Current Db()
With dbFE.TableDefs("frontendtablename")
strBEpath = Mid(.Connect, 11)
strBEtable = .SourceTable
End With

Set dbBE = OpenDatabase(strBEpath)
dbBE.TableDefs.Delete strBEtable
dbBE.Close: Set dbBE = Nothing

dbFE.TableDefs.Delete "frontendtablename"
Set dbFE = Nothing

--
Marsh
MVP [MS Access]
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete a backend table JohnP Microsoft Access 2 1st Oct 2009 02:02 PM
Re: How To Duplicate Table From 1 Backend Database To Another Backend Database John W. Vinson Microsoft Access VBA Modules 0 30th Jun 2009 06:01 PM
Simple task works when MS SQL Server is the backend but not when MySQL is the backend. Ted Microsoft ASP .NET 1 22nd Feb 2007 09:33 PM
Access backend vs mysql backend =?Utf-8?B?RGFu?= Microsoft Access 0 1st Jun 2005 12:46 AM
Copying table in Backend to another Backend =?Utf-8?B?cmRoMWE=?= Microsoft Access Form Coding 3 16th Dec 2004 06:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:51 AM.