Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Values before editing and after saving
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01286843
Message ID:
01286846
Views:
21
I would do this in the save method of your control or form. Do you use classes? Is there a parent class? Do you have a beforesave() and aftersave() or something similar? Is each field saved as the user moves through a field or is there a save button? Is it local tables or sqlserver backend? Store the current value using a property of the control and then check it when the control loses focuses against the current value (or right after your save, etc) or check each field against it original value right after a save (if done using a button, etc)...
*--Say you make a property to each control origvalue and load it
IF THIS.origvalue <> this.value
   && Save your changes then
   && store the record of changes made to the memo field
   && then:
   THIS.origvalue = this.value && so next time going through it checks
ENDIF
>I need to check to see if a value has changed on a form and if it has, record this by placing the before and after values into a memo field in the same table, along with the User's name and date/time the change was made; is there a simple way to do this?
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform