LOCAL llRetval >llRetVal = .T. > >*-- Code to save field value to buffer when >*-- clicking on toolbar without leaving the field >*-- Don't do this for a grid since a grid may change >*-- work areas unexpectedly >IF TYPE("thisform.ActiveControl") == "O" AND ; > UPPER(thisform.ActiveControl.BaseClass) <> "GRID" > IF TYPE("thisform.ActiveControl.ControlSource") <> "U" AND ; > !EMPTY(thisform.ActiveControl.ControlSource) > IF EVAL(thisform.ActiveControl.ControlSource) <> thisform.ActiveControl.Value > REPLACE (thisform.ActiveControl.ControlSource) WITH thisform.ActiveControl.Value > *-- We rely on the fact that we revert the field's value > *-- in the error event method for the form. > llRetVal = (EVAL(thisform.ActiveControl.ControlSource) = thisform.ActiveControl.Value) > ENDIF > ENDIF >ENDIF > >RETURN llRetVal