Knowledge Base

PRB: MODIFY GENERAL Fires the FORM DEACTIVATE Clause

Article ID: 130576

Article Last Modified on 5/7/2003


APPLIES TO


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.

Additional query words: kbvfp600 kbvfp300 kbvfp500

Keywords: kbbug kbprb KB130576