DeleteQueryDef Method (Professional Edition Only)
See Also Example
Description
Deletes a specified QueryDef
Syntax
database.DeleteQueryDef( name )
Remarks
The DeleteQueryDef method uses these parts:
Part Description
database Object variable identifying an open database. If database isn't open, an error occurs.
name String expression that is the name of an existing QueryDef. Note that the name of a QueryDef is not the same as the name of an object variable identifying a QueryDef. If the QueryDef named by name doesn't exist or is open, an error occurs.
QueryDefs are listed in the TableDefs collection of a Database. To test if a member of theTableDefs collection is really a QueryDef, examine the Attributes property of a member of the TableDefs collection.
Once you use DeleteQueryDef, subsequent references to name are invalid and will produce an error.