Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Table In Another Access DB

Status
Not open for further replies.

tubbsy123

Programmer
Dec 2, 2004
19
0
0
AU
Hi,

I have two Access 2003 databases. The master is Export_Process.mdb and the other is DBExport.mdb.

I need to delete the table, tblCampaign, from DBExport. But the initiation must come from the database, Export_Process.mdb. The deletion will be run as part of some other code.

The location of the other database is:

M:\Tools\Databases\Export (PHG)\DBExport.mdb

I have tried various methods but can't seem to get anywhere close.

Any help would be greatly received.

Thanks

Tubbsy123
 
A starting point:
Code:
Set myDB = DBEngine.OpenDatabase("M:\Tools\Databases\Export (PHG)\DBExport.mdb")
myDB.TableDefs.Delete "tblCampaign"
myDB.Close
Set myDB = Nothing

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top