P
paul
I have the following code to determine if a form is loaded. I would like to
use it to find out if a "SUBFORM" is loaded. I tried it and it will not
work. Please would someone advice me how to edit this code to work with the
subform. Thanks.
Function IsLoaded(ByVal strFormName As String) As Integer
' Returns True if the specified form is open in Form view or Datasheet
view.
Const conObjStateClosed = 0
Const conDesignView = 0
If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <>
conObjStateClosed Then
If Forms(strFormName).CurrentView <> conDesignView Then
IsLoaded = True
End If
End If
End Function
use it to find out if a "SUBFORM" is loaded. I tried it and it will not
work. Please would someone advice me how to edit this code to work with the
subform. Thanks.
Function IsLoaded(ByVal strFormName As String) As Integer
' Returns True if the specified form is open in Form view or Datasheet
view.
Const conObjStateClosed = 0
Const conDesignView = 0
If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <>
conObjStateClosed Then
If Forms(strFormName).CurrentView <> conDesignView Then
IsLoaded = True
End If
End If
End Function