Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

ACC2000: How to Delete Objects Programmatically


View products that this article applies to.

This article was previously published under Q209032
Moderate: Requires basic macro, coding, and interoperability skills.

↑ Back to the top


Summary

You can delete objects programmatically by using either the Delete method or the DeleteObject method. You can also use the DeleteObject action in macros.

↑ Back to the top


More information

The Delete method applies to the QueryDefs and TableDefs collections and can be used to delete queries and tables. The Delete method does not apply to the Containers collection and cannot be used to delete objects such as forms or reports.

You can use the DeleteObject method (in code) or action (in a macro) to delete objects that you cannot delete by using the Delete method. Note that Microsoft Access does not request user confirmation when you delete objects by using either the Delete method or the DeleteObject method or action.

↑ Back to the top


References

For more information about the Delete method, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type Delete method in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

For more information about the DeleteObject method, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type DeleteObject method in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

↑ Back to the top


Keywords: KB209032, kbprogramming, kbhowto, kbdta

↑ Back to the top

Article Info
Article ID : 209032
Revision : 4
Created on : 10/11/2006
Published on : 10/11/2006
Exists online : False
Views : 261