PRB: Clicking Disabled Push Button Terminates READ

Last reviewed: November 17, 1995
Article ID: Q102204
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5x, 2.6x
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5x, 2.6x
  • Microsoft FoxPro for Macintosh, versions 2.5x, 2.6a

SYMPTOMS

If a VALID clause on a GET field disables the following push button and the mouse is used to move to that push button, the READ is terminated. However, if the keyboard is used to move to the push button, the READ is not terminated.

CAUSE

The mouse click invokes the VALID clause of the previous object, which attempts to disable the object that has already been clicked. FoxPro handles this condition by terminating the READ.

RESOLUTION

NOTE: This behavior does not occur in Visual FoxPro.

For the READ not to be terminated, add the following command to the VALID clause of the GET field:

   RETURN 1

After the cursor moves to the field following the disabled field, you will see that the cursor is positioned just to the right of the next field. To correct this problem, add the following line of code to the next field's WHEN clause:

   KEYBOARD '{HOME}'

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new screen with one GET field.

  2. In the VALID clause of the GET field, add the following command:

          SHOW GET test DISABLE
    

  3. Create a push button with the variable name "test."

  4. Add another GET field after the push button.

  5. Generate the screen code.

  6. Execute the .SPR program.

  7. With the mouse, click the push button. The READ will terminate.


Additional reference words: FoxMac FoxDos FoxWin 2.50 2.50a 2.50b 2.50c
2.60 2.60a clear close tshoot
KBCategory: kbprg kbprb kbtshoot
KBSubcategory: FxprgGeneral


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.

Last reviewed: November 17, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.