Thank you in advance.
I have a grid bound to a free table. 2 coluns ( qty, description)
I need to know if a user has changed the value of the qty field so i can update an assigned variable with SUM(qty).
I am not sure how to check for value change.
I would not worry if the user has changed the value or not, but would do the SUM every time the users leaves that field. That is by using the lost focus event of qty column.
For VFP, it is a neglible load. If you think that it is huge load, then capture the start value in gotfocus event and check to see if it needs a total in the lost focus event.
Interactive change event will fire after every digit data entry and that will be clumsy specificaly with numeric fields which also participate in the total.
But much easier way will be..
to capture the existing qty in the got focus event and then do a - of the captured qty + the new value in the lost focus event to the sum, so that the SUMing need not be done which involves record pointer movements.
Thank you all.
Ramani, that's exactly what i did.
created a new property to store the gotfocus value, then comparing to the lostfocus.value. If different, then do the SUM()
Thanks
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.