PRB: ERROR "<formname> not an object" When Accessing Form (129402)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
This article was previously published under Q129402 SYMPTOMS
Accessing a form causes the error message "Unknown member <formname>" to be
displayed.
CAUSE
If a form is modal, the program pauses when it's displayed. A common
reaction is for the user is to close the form to allow the program to
continue execution. However, if the code that subsequently runs refers to
any properties of the form, the error message is displayed because the form
is out of scope (closed).
WORKAROUND
The WindowType property controls whether the form is modeless
(the default) or modal. Setting the WindowType property for the form or
formset in the DEFINE CLASS code to 0 (zero - modeless), or not including
the WindowType property (causing a default of 0) resolves the problem.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 2/12/2000 |
---|
Keywords: | kberrmsg KB129402 |
---|
|