thanks for that Dan, I didn't know that function existed! rr
-----Original Message----- From: Dan Covill [mailto:dcovill at san DOT rr.com] Sent: Thursday, Jun 12, 03 11:40 AM To: profoxtech@leafe.com Subject: Re: VFP7: Checking for Changes Made by the User
Desmond:
Simplest way I know is to save the record as an object, before and after, and use cmpobj() to compare them. It's blindingly fast, and protects you from wasting time on those cases where user changed something and then changed it back. We use it in an Audit process, and the time is unnoticeable in all cases.
scatter memo name oBefore && before edit scatter memo name oAfter && after "edit" if not compobj(.oBefore, .oAfter) -- then it changed -- do whatever you need to
Dan Covill
At 15:28 06/12/03 +0000, Desmond Lloyd wrote: >Good Morning All, > >Have taken over an application that has very "iffy" method of determining >if changes were made by the user and whether or not changes should be >"saved". On some forms a property called datachanged is defined and is >intermittently updated to .t. so that upon releasing the form it will >check that property and if the changes aren't saved, prompts the user... > >Is there some sort of standardized method to check for these changes? If >the value is changed in a textbox you could compare that to the original >value and know that something has changed. (that's alot of text boxes to >update) > >How's about subclassing the textbox class and throwing some code in the >interactive change event tht indicates a change?
[excessive quoting removed by server]
©2003 Randy Roberts |