Public Function IsOpen(ByVal strFormName As String) As Boolean
' Returns True if the specified form is open in form view
Const conDesignView = 0
Const conObjStateClosed = 0
IsOpen = False
If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <> conObjStateClosed Then
If Forms(strFormName).CurrentView <> conDesignView Then
IsOpen = True
End If
End If
End Function