R
rwboyden via AccessMonster.com
I'm using the following code to try to delete all the reports in the current
database. It doesn't work. What am I missing? Many thanks
Dim obj As AccessObject
Dim dbs As Object
Set dbs = Application.CurrentProject
For Each obj In dbs.AllReports
If obj.IsLoaded = True Then
strRpt = obj.Name
DoCmd.DeleteObject acReport, strRpt
DoEvents
End If
Next obj
database. It doesn't work. What am I missing? Many thanks
Dim obj As AccessObject
Dim dbs As Object
Set dbs = Application.CurrentProject
For Each obj In dbs.AllReports
If obj.IsLoaded = True Then
strRpt = obj.Name
DoCmd.DeleteObject acReport, strRpt
DoEvents
End If
Next obj