PC Review


Reply
Thread Tools Rate Thread

Delete query in another database

 
 
Nan Hauser
Guest
Posts: n/a
 
      13th Jan 2010
Is there any way to delete a query in another database other than the current
database?
 
Reply With Quote
 
 
 
 
Marshall Barton
Guest
Posts: n/a
 
      13th Jan 2010
Nan Hauser wrote:

>Is there any way to delete a query in another database other than the current
>database?



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.

--
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 Query - Delete matching records from 2 tables - Access 2000 Chris Stammers Microsoft Access Queries 4 22nd Jan 2009 02:45 PM
is UPDATE or DELETE QUERY able to touch another database? mezzanine1974 Microsoft Access Form Coding 4 22nd May 2008 02:25 PM
Delete query is passing a select statement to my SQL2000 server database. Why? Tanzen Microsoft Access Queries 1 13th Jul 2007 01:14 AM
How can I delete database in the Open Recent Database list =?Utf-8?B?R2Vhcg==?= Microsoft Access 8 26th Jul 2006 06:43 AM
Delete Query to SQL Database Times Out =?Utf-8?B?Sm9obiBQaW90cm93c2tp?= Microsoft Access Queries 4 7th Sep 2005 09:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:15 AM.