PRB: MODIFY GENERAL Fires the FORM DEACTIVATE Clause (130576)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 3.0
  • Microsoft Visual FoxPro for Windows 3.0b
  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 5.0a
  • Microsoft Visual FoxPro for Windows 6.0

This article was previously published under Q130576

SYMPTOMS

Issuing a MODIFY GENERAL or MODIFY MEMO command in a Visual FoxPro form causes the Deactivate event of the form to fire. This is because the window created by the MODIFY GENERAL or MODIFY MEMO commands causes the form to lose focus.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce

  1. Create a new form based on a table with a General field.
  2. Add a command button and a text box to the form. Set the Control Source of the text box to the General field of the table.
  3. Add the following code to the Click event of the command button:
          WAIT WINDOW "About to modify the general field"
          MODIFY GENERAL <general fieldname>
          WAIT WINDOW "After modify general"
    					
  4. Add the following code to the Deactivate event of the form.
          WAIT WINDOW "Called from Deactivate Event"
    					
  5. Save and run the form. Note that the Wait Window placed in the Deactivate event appears after you click the command button.

Modification Type:MajorLast Reviewed:5/7/2003
Keywords:kbBug kbprb KB130576