Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_CUROBJ and valids
Message
From
11/04/1998 18:10:35
 
 
To
09/04/1998 18:21:30
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00090899
Message ID:
00091352
Views:
30
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
Map
View

Click here to load this message in the networking platform