... Where oNomTra:VarNomTraCod is the buffer where data is being input, Is_valid(...) is a function that recieves the inputed value and returns .t. if acceptable and .f. if not which you may later .or./.and. with a MsgYesNo stating the fact. If clicking on Save button, then oNomTra:Save() is called ...