Site Search:
Sign in | Join | Help

This Blog

Syndication

Tags

No tags have been created or used yet.

Microsoft Access

Tricks and Tips for Microsoft Access

IsOpen function for Access

Public Function isOpen(strName As String, Optional intObjectType As Integer = acForm) As Boolean
On Error GoTo err_isOpen
        'Returns True if strName is open, False otherwise.
        'Assume the caller wants to kmow about a form.
        isOpen = (SysCmd(acSysCmdGetObjectState, intObjectType, strName) <> 0)
exit_isOpen:
    Exit Function
err_isOpen:
    MsgBox Err.Description
    Resume exit_isOpen
End Function

Comments

No Comments

Leave a Comment

(required)  
(optional)
(required)  
Add

About Steve Gray

Steve is a seasoned (translate: old) developer in VB and ASP.NET. He spends most of his time in Dynamics GP, writing custom mods for consulting firms. Crystal reports, eConnect, VS Tools for Dynamics... anything that comes along.