>Yes, David is right. I'd suggest you put your code on the lostfocus event.
Esteban,
I think the Valid event is okay for your code, since you are validating user input. In other languages you'd use the LostFocus(), but FoxPro gives us a Valid event that makes it easy to prevent the user from exiting the field. You just want to be sure if the problem is that the event isn't firing or that the code isn't running.
BTW, If the default "Invalid Input" message is not enough, you can display your own message and RETURN 0 instead of RETURN .F. RETURN 0 will return the cursor to the control without displaying the Invalid Input message.
David.