G
Guest
Alright, This formula is working, though it is not successfully looping
through all the reports. It ends up erroring out.
I want it to loop through each of the reports within the database and delete
it if there is a 1 at the end of the label of the report. Like I said it
works, however the loop is incorrect, any ideas? THANKS!!!
Dim obj As AccessObject, dbs As Object
Set dbs = Application.CurrentProject
For Each obj In dbs.AllReports
If Right(obj.Name, 1) = "1" Then
DoCmd.DeleteObject acReport, obj.Name
End If
Next obj
through all the reports. It ends up erroring out.
I want it to loop through each of the reports within the database and delete
it if there is a 1 at the end of the label of the report. Like I said it
works, however the loop is incorrect, any ideas? THANKS!!!
Dim obj As AccessObject, dbs As Object
Set dbs = Application.CurrentProject
For Each obj In dbs.AllReports
If Right(obj.Name, 1) = "1" Then
DoCmd.DeleteObject acReport, obj.Name
End If
Next obj