That does not sound like a good approach to whatever you are
trying to accomplish.
For a Jet database, you can use code something like:
Dim db As DAO.Database
Dim qdf As DAO.Query
Set db = OpenDatabase("full path to other database")
db.QueryDefs.Delete "name of table"
db.Close : set db = Nothing
But there are nuances so be sure to check VBA Help on the
OpenDatabase method and QueryDefs collection.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.