Public Function adhIsOpen( _
strName As String, _
Optional lngObjectType As AcObjectType = acForm) As Boolean
' Returns True if strName is open, False otherwise.
' Assume the caller wants to know about a form.
' From Access 2002 Desktop Developer's Handbook
' by Litwin, Getz, and Gunderloy (Sybex)
' Copyright 2001. All rights reserved.
adhIsOpen = (SysCmd(acSysCmdGetObjectState, _
lngObjectType, strName) <> 0)
End Function
|