Microsoft KB Archive/192082

= BUG: Removing DataEnvironment in Form Load Causes Fatal Error =

Article ID: 192082

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q192082



SYMPTOMS
Using the RemoveObject method in the Load event of a form to remove the DataEnvironment object, causes a fatal error message.



RESOLUTION
Move the following code from the Load event to the Init event of the form: Thisform.RemoveObject("DataEnvironment")



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.



Steps to Reproduce Behavior
 Create a form.  In the Form Load event, add in the following code: Thisform.RemoveObject("DataEnvironment")  Save and run the form.

Immediately after the form runs the fatal error message occurs. Visual FoxPro then terminates.

Additional query words: kbVFp300bbug kbVFp500abug kbVFp600bug kbOOP kbCtrl kbContainer

Keywords: kbbug kbnofix KB192082

-

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

© Microsoft Corporation. All rights reserved.