You need to create the Function IsLoaded in a module:
Function IsLoaded(ByVal strFormName As String) As Boolean
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
It can then be called from any event in a form:
If IsLoaded("frmName") Then
'Usually refresh the data
Else
End If
HTH
Dave