What error, if any, does it give you? Or does it just not write the changes back?
By default, views do not have the key field selected for update. Maybe the initial save is not saving the key so there is no way to subsequently update it.
>I have a locate view as
>
>CREAT SQL VIEW vpr AS;
> SELE id,pr,reqDate,dept,shortname,itemcode,pr.desc,stkinhd,qty,;
> unit,uprice,ok,relByHead,po,remark,appRmk,purApp,prDate,;
> appQty,appAmt,appPrice,amount,purpose,userId,keyInDate;
> FROM pr,dept ;
> WHERE pr.dept = dept.code AND;
> dept = ?mdept AND;
> BETWEEN(userid,?mUser1,?mUser2) AND;
> BETWEEN(amount,?mamt1,?mamt2) AND;
> BETWEEN(pr,?mpr1,?mpr2) AND;
> BETWEEN(relByHead,?mRelByHead1,?mRelByHead2) ;
> ORDER BY pr,ok
>
>dbsetprop("vPr","VIEW","SendUpdates",.T.)
>dbsetprop("vPr.ID","field","default","getkey('PR')")
>
>I use it in a data entry form. The form have a command button and the click method :
>
>SELE vPr
>IF !TABLEUPDATE()
> WAIT WIND 'Cannot Save the Record, Please try later.'
> =TABLEREVERT()
>ENDIF
>
>I can save new record to base table (pr). But when I edit the record and want to save it, system disallow me to save the change. Why??
>
>
>TIA.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao