checking whether a form is opened

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

I'm using the following code to check whether the form is
opened:

If SysCmd(acSysCmdGetObjectState, acForm, stDocName) > 0
Then

fnFormOpenCheck = False
Exit Function
Else

fnFormOpenCheck = True
End If

But, when the form is actually closed I'm getting
fnFormOpenCheck = True, which means it's opened.

Could anybody clarify what it's wrong here?

Thanks
 
Back
Top