C
Christopher
Hi
I have two database, Can I access DB2 From DB1 to be able
to delete a table in DB1
Thanks
I have two database, Can I access DB2 From DB1 to be able
to delete a table in DB1
Thanks
Christopher said:Hi
I have two database, Can I access DB2 From DB1 to be able
to delete a table in DB1
Dave said:Christopher,
I presume that you mean you want to access db1 FROM db2
to delete a table in db1. This will work:
'This module is defined in database db2.
'
Public Sub test_remote_delete()
Dim db1 As New
Access.Application 'create an access
object variable.
Set db1 = CreateObject
("Access.application") 'instantiate the object
variable
db1.OpenCurrentDatabase "<complete path
name>\db1.mdb" 'point the variable at db1
db1.DoCmd.DeleteObject acTable, "Table1"
End Sub
Dave