I am trying to show the description of all the reports in my DB in a query,
whether the report is open or closed.
The following prints the names OK, but when it dets to the line Debug.Print
obj.Properties(1) I get, not unsurprisingly, a message that the report is
not open.
Grateful for any ideas
Thanks
Function GetDesc(RptName As String) As String
Dim obj As AccessObject, dbs As Object
Set dbs = Application.CurrentProject
' Search for open AccessObject objects in AllReports collection.
For Each obj In dbs.AllReports
If obj.Name = RptName Then ' Correct report
' Print name of obj.
Debug.Print obj.Name
Debug.Print obj.Properties(1) ' ***** Fails
GetDesc = Obj.Properties(1)
End If
Next obj
End Function