Activate report

C

Chris

Hi

This is what I have

I ahve 5 reports open I want each time I close one report
to verify if there is any other report opened

Is it possible or no

I tried

Dim ctlCurrentControl As report
Dim strControlName As String
Set ctlCurrentControl = Screen.activereport
strControlName = ctlCurrentControl.Name

But what I have is the currect report

Thanks
 
S

SA

Use

If SysCmd(acSysCmdGetObjectState, acReport, "YourReportName") =
acObjStateOpen Then
Reports!YourReportName.Close
End if

HTH
 
Top