The information in this article applies to:
SUMMARYWhen using a command button to set the focus to another object, you may sometimes want to disable the command button and move the focus to another object until another event occurs or a value is entered in a field. This article shows by example how to do it. MORE INFORMATION
The most obvious solution, doesn't work. You can't use the SetFocus method
followed by "Enabled=.F." in the Click event of a command button. When the
Click event of the command button is activated, the command button becomes
disabled, but the focus is not moved to the specified control. The focus
moves to the next object in the Tab Order instead of to the specified
object.
Step-by-Step Example
REFERENCESFor additional information on the use of the NODEFAULT command, please see the following article in the Microsoft Knowledge Base: Q131095 How to Control the Occurrence of a Default EventFor additional information on SetFocus behavior, please see the following article in the Microsoft Knowledge Base: Q130525 PRB: SetFocus Doesn't Work When Called in the Valid Event Additional query words: VFoxWin got disable commandbutton
Keywords : kbcode FxotherGeneral |
Last Reviewed: August 24, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |