>*-- gotfocus of text control in grid >this.Tag=str(this.Value) > >**-- fixed problem by adding the below code to the lostfocus of text control in grid >*-- don't know why this solved problem - i copied the code >*--from an almost identical form that this new system is modeled after. >*-- I realized that the new code was the same as the old with the >*--exception of this piece. I don't know why this is needed. I understand >*-- why I need to capture the value of the control upon entry into >*-- the grid's textbox, but why on exit? I have no idea why this >*-- fixed the problem > >*-- lost focus of text control in grid >this.Tag=str(this.Value) > > >*-- valid of text control in grid >*-- i am using the tag property to capture changes to the grid text control >*-- instead of using buffering or some other method >If This.Value <> val(This.Tag) > > ln_reserve_calc=cc_soman.nordqty - cc_soman.nshipqty-cc_soman.nsubdamt-cc_soman.ncancdamt- cc_soman.nadjreserved - cc_soman.nadjoporeserved > > If ln_reserve_calc < 0 > Messagebox('You can not over reserve, the quantity you entered would result in a negative unreserved of ' + Str(ln_reserve_calc),0+64,'Negative Unreserved') > ln_retval=0 > Else > lndifference=cc_soman.nadjreserved-Val(This.Tag) > *ln_actual_qty_reserved= thisform.update_po_reserved(lndifference) > *-- second parameter true - called from manual - will wait with messageoboxes if necessary > ln_actual_qty_reserved= Thisform.update_onhand_reserved(lndifference,.T.) > Replace cc_soman.nadjallreserved With cc_soman.nadjallreserved+(lndifference ) In cc_soman > ln_retval=1 > Endif > >Else > ln_retval=1 >Endif >Return ln_retval >>