>I looked up OBJNUM() and _CUROBJ and I had the syntax right, it just didn't work. Here's an example of my code:
>
>@ 3,29 GET staff.number ;
> SIZE 1.000,13.167 ;
> VALID valstaf() error errmess
>
>READ valid valme()
>
>procedure valstaf
>ret = .t.
>getno = _CUROBJ
>if ";"$staff.number
> errmess="Person's # may not contain semi-colon(;)"
> ret = .f.
>endif
>return ret
>
>procedure valme
>ret = .t.
>if "" = trim(staff.number) .and. fromhere <> 2
> errmess="Person's # may not be blank"
> ret=.f.
> wait window errmess nowait
> _CUROBJ = getno
>else
> ret = .t.
> if (""= trim(staff.number) .or. isnew) .and. fromhere = 2
> delete
> endif
>endif
>return ret
Joe,
I believe you need to return .T. from the valid instead of .F.
The return .F. is overiding you change to the _CUROBJ. Also take note to Jim Nelson's observation about the visibility of "getno".
Mike
Michael McLain