M
Max Moor
Hi All,
I have a function to test if a form is open or not. I didn't write it,
nor do I know where it came from. The function is (with the error handler
removed):
Public Function FormIsLoaded(ByVal strFormName As String) As Boolean
If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <> 0 Then
If Forms(strFormName).CurrentView <> 0 Then
FormIsLoaded = True
End If
End If
End Function
I call this to see if a form "frmLeftNav" is open. I know for a fact
that it is not open.
SysCmd(acSysCmdGetObjectState, acForm, strFormName) returns a 1,
though, saying it is open. Of course, the Forms(strFormName).CurrentView
part then throws an error, because the form isn't open.
Does anyone understand the acSysCmdGetObjectState well enough to tell
me what might be wrong?
Regards,
Max
I have a function to test if a form is open or not. I didn't write it,
nor do I know where it came from. The function is (with the error handler
removed):
Public Function FormIsLoaded(ByVal strFormName As String) As Boolean
If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <> 0 Then
If Forms(strFormName).CurrentView <> 0 Then
FormIsLoaded = True
End If
End If
End Function
I call this to see if a form "frmLeftNav" is open. I know for a fact
that it is not open.
SysCmd(acSysCmdGetObjectState, acForm, strFormName) returns a 1,
though, saying it is open. Of course, the Forms(strFormName).CurrentView
part then throws an error, because the form isn't open.
Does anyone understand the acSysCmdGetObjectState well enough to tell
me what might be wrong?
Regards,
Max