DeleteByName Method

Deletes an object from the collection by its Name property.

Applies to objects: Connections, Databases, Fields, Indexes, Properties, QueryDefs, Recordsets, Relations, TableDefs, Workspaces.

Syntax

object.DeleteByName(Name)

The DeleteByName method syntax has these parts:

Part Description
object Required. An instance of one of the object collections listed above.
Name Required. An expression that returns a String value. The name of the object to be deleted.

Remarks

If the object with the specified objName is missing in the collection, the following error occurs: "The item 'objName' is not found in the collection"

Example

.......

 

See Also

Connection Object, Connections Object, Database Object, Databases Object, Field Object, Fields Object, Index Object, Indexes Object, Property Object, Properties Object, QueryDef Object, QueryDefs Object, Recordset Object, Recordsets Object, Relation Object, Relations Object, TableDef Object, TableDefs Object, Workspace Object, Workspaces Object, Name Property.