>I check in my grid's text lostfocus if the entered code is in the library, if it is there, i put the corresponding codename in the 2nd column.
>
>If it is not found, I want the cursor to go back to that column until he inputs a valid code. How can I do this?
if !m.YourCheckResult
NODEFAULT
this.setfocus()
endif
Another alternative is BRCC of grid if you want to code at grid level. In that case be sure you call .Value = .Value for currrent control.
PS: I don't prefer using Valid event especially in a grid.
Cetin