Joe,
Even though you change _CUROBJ variable in a valid, it does not change until you exit the valid. By setting it you are kind of asking to change objects, but the change doesn't happen till you exit this one. Meanwhile _CUROBJ tells you in which object you are _now_.
It is best to test for the error in the field valid. I always give the error message myself and return .T. and find it less complicated. If you have serveral fields it probably is good to test in the read valid as well. Naturally the read valid needs to return .F.
@ 3,29 GET staff.number ;
SIZE 1.000,13.167 ;
VALID valstaf() error errmess
READ valid valme()
PROCEDURE valstaf
IF ";" $ staff.number
WAIT WINDOW "Person's # may not contain semi-colon(;)"
_CUROBJ = OBJNUM(staff.number) && Or any other variable
* BY the way _CUROBJ = _CUROBJ forces it to stay, too, if you use it here
ENDIF
RETURN
Alex
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only