UtterAccess HomeUtterAccess Wiki

Welcome Guest ( Log In | Register )

Custom Search
Edit Discussion
> IsObjectOpen    

Tests if an object (Table, Query, Form, Report, Macro or Module) is open.

Function IsObjectOpen(strName As String, Optional intObjectType As AcObjectType = acForm) As Boolean
' intObjectType can be:
' acTable (value 0)
' acQuery (value 1)
' acForm (value 2) Default
' acReport (value 3)
' acMacro (value 4)
' acModule (value 5)

' 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

Creative Commons License
IsObjectOpen by UtterAccess Wiki is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Editing and revision of the content is freely encouraged; for details, see Expected Usage.

Edit Discussion
Custom Search

Thank you for your support!
This page has been accessed 5,903 times.  This page was last modified 14:10, 22 August 2012 by BananaRepublic. Contributions by Mark Davis  Disclaimers