Microsoft KB Archive/191686

= BUG: Focus Changes Even Though Grid Text Box Valid Returns .F. =

Article ID: 191686

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 Q191686



SYMPTOMS
In a grid, focus leaves the text box control to go to the control you are clicking even though the Valid method of the text box returns .F. or 0. However, the focus remains unchanged in the text box control when you are tabbing out to move to a different control.



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 new form, named mytest. Add a one column grid to the form and two Command buttons.  In the Load event of the form, insert the following code: SET SAFETY OFF CREATE TABLE xyz (name C(10)) INSERT INTO xyz VALUES ("test")   In the Valid method of the text box in the grid, place the following code: RETURN .F.                            Save and run the form.

After you open the form, click Command button 1. The "Invalid input" message appears and then the focus shifts from the text box in the grid to the Command button. At the same time, the grid's text box also has a black border indicating that it also has focus. At this point, if you press the Tab key, the focus moves to the other command button. Apparently, the focus is no longer with the text box even though the Valid method in the text box is returning false.

Additional query words: kbVFp600bug kbVFp500abug kbVFp300bbug kbCtrl kbContainer

Keywords: kbbug kbnofix KB191686

-

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

© Microsoft Corporation. All rights reserved.