I am trying to do a function
the idea is when the string name of the report is passed on and it happens to be open it closesCode:Function checkReportClosed(ReportName As String) If CurrentProject.AllReports(ReportName).IsLoaded Then Reports!report(ReportName).Close End If End Function
but I can't get it to work because I don't know how to get reports! etc to work
the report opens in the background