DoCmd DeleteObject in Microsoft Access

 

Docmd.DeleteObject Method Example

The DoCmd DeleteObject method performs the Delete Object action in Visual Basic.  The command is often used to remove temporary objects created at run time in the Access database.  The image and text below explain the syntax and options of the Delete Object command.

docmd deleteobject Access Method

ObjectType Optional – AcObjectType.AcObjectType can be one of these constants.
acDataAccessPage
acDefault     (default)
acDiagram
acForm
acFunction
acMacro
acModule
acQuery
acReport
acServerView
acStoredProcedure
acTable

ObjectName Optional – a string expression that is the valid name of an object of the type selected by the objecttype argument.

 

Microsoft Office VBA, MS Access 2003, 2007, 2010, 2013, 2016