Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

grid, value of record (field) change

Status
Not open for further replies.

fitedgar

MIS
Apr 24, 2002
238
US
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.

EMC
 
You can put your SUM() code in the Interactivechange event of the qty textbox.

Jim

 
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.

:)

ramani :)
(Subramanian.G)
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top