There are several ways to do this. If you need to do this more than one
time or for more than one report, try adding a module with code similar to
the following:
Public Function repIsLoaded(ByVal strReportName As String) As Boolean
'Returns true if the specified form is open in either form or datasheet
view
Dim oAccessObject As AccessObject
Set oAccessObject = CurrentProject.AllReports(strReportName)
If oAccessObject.isLoaded Then
repIsLoaded = True
End If
End Function
Then, to see if a given report is open, use the following syntax:
If repIsLoaded("REPORT_NAME") = True Then
.......
End if
If you only need to check once if a report is open, modify the code to fit
as needed (use the .IsLoaded property of an AccessObject)
HTH