How to programmatically delete objects (Forms,Reports) from the database

accesser2003

Registered User.
Local time
Tomorrow, 01:14
Joined
Jun 2, 2007
Messages
124
Is it possible to programmatically delete database objects like Forms or Reports from the database? What is the instruction used to do this?

Thanks
 
Try this...

Dim obj As AccessObject, dbs As Object
Set dbs = Application.CurrentProject
For Each obj In dbs.dbs.AllForms 'dbs.AllForms
Debug.Print obj.Name
'DoCmd.DeleteObject acForm, obj.Name
Next obj
 

Users who are viewing this thread

Back
Top Bottom