Function IsObjectOpen(strName As String, Optional intObjectType As Integer = acTable) As Boolean
' intObjectType can be:
' acTable (value 0) Default
' acQuery (value 1)
' acForm (value 2)
' acReport (value 3)
' acMacro (value 4)
' acModule (value 5)
#39; Returns True if strName is open, False otherwise.
On Error Resume Next
IsObjectOpen = (SysCmd(acSysCmdGetObjectState, intObjectType, strName) <> 0)
If Err <> 0 Then
IsObjectOpen = False
End If
End Function
Nesne açık mı kodu: