How to Keep Cursor in GET Object If Data Is InvalidID: Q117591 2.00 2.50 2.50a 2.50b 2.60 | 2.50 2.50a 2.50b 2.60 | 2.50b 2.50c
The information in this article applies to:
SUMMARYThis article describes how to keep the cursor in a GET object if the data that was entered is invalid.
MORE INFORMATIONThe following code examples illustrate two ways of keeping the cursor in a GET object.
Example 1This example uses a GET field called m.pass and calls a UDF function named Testit() each time the cursor leaves the field. By default, the Testit() function will always return true (.T.), which updates the object with the current value. If invalid or incorrect data was entered in a field, you can return false (.F.), which keeps the original value unchanged in the GET field and displays an "Invalid Input" message.
You can suppress the "Invalid input" message by returning a value of zero
(0) instead of .F. For more information on using RETURN 0, please see the
following article in the Microsoft Knowledge Base:
Example 2The following code illustrates how you can force the cursor to remain in the same field object by setting the value of _CUROBJ (current object) to itself instead of using RETURN .F. in the called procedure.
Additional reference words: FoxMac FoxDos FoxWin 2.00 2.50 2.50a 2.50b
2.50c 2.60
logical
field
level updates
KBCategory:
KBSubcategory: FxprgGeneral
|
|
Last Reviewed: May 22, 1998 © 1999 Microsoft Corporation. All rights reserved. Terms of Use. |