>Thanks for the code and it appears to work for the most part. A couple of things:
>
>1.) How can I have it to Raise the alarm while there's a difference in the entries (ie a screen that tells them "hey the first time you entered xxxx and the second time you entered aaaaaa. Which one do you want?" and it will display their entries on screen along with push buttons to select which one....I can do the form but I'm stumped on the process)
>
>2.) My forms include more than text boxes. They also include checkboxes and drop lists. How can I have it to check for those as well?
>
>TIA
>
>Jeff T.
Jeff,
I missed it but I think you're talking about "tag" approach. It's a wise way but have shortcomings. Main shortcoming you have to write a good recursion to do it for "all" the controls (controls might be in other containers, like grids, pageframes etc). Or you should subclass all your controls to log to tag property on first pass and catch on second instantly as field about to "lostfocus" (in lostfocus a nodefault would prevent to lose focus).
It's a way but for this I think it's expensive unless you have routines and/or classes ready (still I can post you a recursion that would collect all).
If all is based on cursor-table data then I would suggest doing like this (Buffering is on or off - doesn't matter for this but matters for your save or revert whole) :
scatter name thisform.oOldVals memo
scatter memvar memo blank
gather memvar
for ix = 1 to fcount()
if eval(field(ix)) # eval("thisform.oOldVals."+field(ix))
ll1st = messagebox( ;
"1st pass :"+transform( eval("thisform.oOldVals."+field(ix)) )+chr(13) +;
"2nd pass :"+transform( eval(field(ix)) )+chr(13) +;
"Revert to first pass ?", ;
4+48+0,field(ix) + " : Data mismatch") = 6
if ll1st
replace (field(ix)) with eval("thisform.oOldVals."+field(ix))
endif
endif
endfor
PS: Messagebox() could bomb with long memo data. For general could only differ between empty() and !empty(). Just to show logic.
Cetin