checking whether a form is opened

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
 
A

Alex

Thanks, everybody.
I've got it. When it's true it means the form is closed
not opened.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top