Проверка - Открыт ли Отчёт? (IsReportLoaded)
Public Function IsReportLoaded(sReportName$) As Boolean
On Error GoTo IsReportLoaded_Err
If CurrentProject.AllReports(sReportName).IsLoaded Then
If CurrentProject.AllReports(sReportName).CurrentView > 0 Then
IsReportLoaded = True
End If
End If
IsReportLoaded_Bye:
Exit Function
IsReportLoaded_Err:
Err.Clear
Resume IsReportLoaded_Bye
End Function
|