DOCUMENT:Q191640 06-AUG-1999 [foxpro] TITLE :BUG: ActiveForm Property Returns Error When Not FormSet PRODUCT :Microsoft FoxPro PROD/VER:WINDOWS:6.0 OPER/SYS: KEYWORDS: ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual FoxPro for Windows, version 6.0 ------------------------------------------------------------------------------- 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 : Technology : kbVFPsearch kbAudDeveloper kbVFP600 Version : WINDOWS:6.0 Issue type : kbbug Solution Type : kbpending ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 1999.