Cause
This error occurs when a method that is a directive to the physical window associated with a form or control is accessed and there is no such associated window; for example, calling the unload method for a form has no meaning if there is no associated running form.
This error occurs if the object is not a running form, or the object is not a control that is attached to a running form.
Action
Check the window object that is being accessed.