Deleting a QueryDef Object

You can delete a permanent QueryDef object by using the Delete method on a QueryDefs collection. In this example, dbs is a Database object and strQueryName is the name of a query in that database:

dbs.QueryDefs.Delete strQueryName