Microsoft KB Archive/191640

= BUG: ActiveForm Property Returns Error When Not FormSet =

Article ID: 191640

Article Last Modified on 8/6/1999

-

APPLIES TO


 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q191640



SYMPTOMS
Referencing the ActiveForm property of a form through code returns the following error:

Property ActiveForm is not found.

ActiveForm is, however, listed in the Properties dialog box of the form.



RESOLUTION
Do not reference the ActiveForm property of a form.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.



MORE INFORMATION
Even though the ActiveForm is listed as a property of the form object, it is only applicable to the FormSet object.

Steps to Reproduce Behavior
Place the following code in a program file. **************************************************************     *!* Start Error Example (Form) **************************************************************     ox=CREATEOBJECT('oForm') ox.VISIBLE=.T.     READ EVENTS *****************************************     DEFINE CLASS oForm AS FORM NAME='MyFormFoo' ADD OBJECT oCommand AS COMMANDBUTTON ADD OBJECT oClose AS COMMANDBUTTON

PROCEDURE INIT THIS.oCommand.LEFT=100 THIS.oCommand.TOP=100 THIS.oClose.LEFT=100 THIS.oClose.TOP=200 ENDPROC

PROCEDURE oCommand.CLICK WAIT WINDOW  THISFORM.ACTIVEFORM.NAME ENDPROC

PROCEDURE oClose.CLICK CLEAR EVENTS RELEASE THISFORM ENDPROC

ENDDEFINE **************************************************************     *!* End Error Example (Form) Run the program and click the oCommand button. This returns the following error:

Property ActiveForm is not found.

Additional query words: kbVFp600bug kbContainer kbCtrl

Keywords: kbbug kbpending kbcode KB191640

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.