You have to call your this.obiz.GetCompanyRecord(@loRec) again to get a
separate instance.

Fred

On Sat, Mar 14, 2015 at 9:24 PM, <
[email protected]> wrote:

> In my form.load event:
>
> LOCAL loRec as Object
> this.obiz.GetCompanyRecord(@loRec)
> this.oStartingRecord = loRec
> this.oRecord = loRec
>
> in my form.unload event:
> SET STEP ON
> IF NOT COMPOBJ(this.oStartingRecord,this.oRecord) THEN
>         IF this.obiz.ValidRecord(this.oRecord) THEN
>                 IF MESSAGEBOX("Do you want to save your
> changes?",4+32+0,"Save changes?") = 6 THEN
>                         IF this.obiz.UpdateRecord(this.
> oRecord.cID,this.oRecord,'luMyTable') THEN
>                                 DODEFAULT()
>                         ELSE
>                                 this.ShowBizMsg()
>                         ENDIF
>                 ELSE
>                         DODEFAULT()
>                 ENDIF
>         ELSE
>                 this.ShowBizMsg()
>         ENDIF
> ELSE && no changes...just close
>         DODEFAULT()
> ENDIF
>
>
> This doesn't work, because it's sharing the same segment of memory, so any
> changes to thisform.oRecord are also happening to
> thisform.oStartingRecord.  I did this successfully years ago, but
> apparently I've forgotten something.
>
> What am I missing and/or doing wrong?  It's gotta be something
> small/simple I'm thinking.
>
> tia,
> --Mike
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/CAJCBksoUoh5t-Qe0gCmyNmCbpHo304JYi2_XRu=zdhxq6ia...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to