I was wondering if anyone knew how to check if a form is open in design view. I have a function that I call to check if the form is open and it works OK. The problem is that the form is open in design mode, the code still returns True. If the form is in design mode, I want the function to return False.
Private Function IsOpen(strName As String, Optional lngObjectType As AcObjectType = acForm)
' Returns True if strName is open, False otherwise.
' Assume the caller wants to know about a form.
IsOpen = (SysCmd(acSysCmdGetObjectState, lngObjectType, strName) <> 0)