Function reportexists(rname As String)
Dim dbs As Database
Dim ctr As Container
Set dbs = CurrentDb
Set ctr = dbs.Containers!Reports
On Error GoTo noreport
reportexists = ctr(rname).Name = rname
exithere:
Set dbs = Nothing
Set ctr = Nothing
Exit Function
noreport:
reportexists = False
Resume exithere
End Function