* A global place called when recpointer in parent changes * ie: Navrefresh in wizard buttons select sum(f1), sum(f2), sum(f3) ; from mytable ; where myTable.Linkkey = parentPKValue ; into array SQLArray thisform.myTextBox1.value = iif(type("SQLArray[1]") = "N",SQLArray[1],0) thisform.myTextBox2.value = iif(type("SQLArray[1]") = "N",SQLArray[2],0) thisform.myTextBox3.value = iif(type("SQLArray[1]") = "N",SQLArray[3],0)-Result is effected only if field values of those 3 fields change.
thisform.myTextBox1.value = ;
thisform.myTextBox1.value + ;
(iif(isnull(this.value),0,this.value) - val(this.tag))
That's it. Isnull checking is not a must depending on it's allowed to have them or not. So for generosity I include it. This approach has noticable advantage if tables are large enough. Otherwise VFP does native calculations fast enough. Another advantage, you could generalize this w/o a fear of moving rec pointer and thus causing triggers to fire (ie: your table valid code would fire otherwise if nothing else).
CetinÇetin Basöz
The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses
LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad