Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Total a grid column
Message
 
To
17/11/1999 14:02:19
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00291973
Message ID:
00292123
Views:
31
You need to put it in your procedure file, or have it as standalone procedure in .prg file

Into AfterRowColChange you just put the call to this function/procedure

mytextbox.value = sum_activity_hours(employeeno)

Nick


>Hi Nick,
>Thanks for the suggestion. I am new to some of this. Where do you insert such code? I tried it in the AfterRowColChange of Grid1 and got an error "Methods or events cannot contain nested procedures or class definitions."
>
>Pardon stupid question. (Would that be PSQ?)
>
>Thanks again,
>Sylvia
>
>
>>Silvia, I usually use the functions like this one for getting the sums:
>>
>>FUNCTION sum_activity_hours
>>LPARAMETER lcEmployeeno
>>LOCAL laSum[1]
>>store 0 to laSum[1]
>>SELECT SUM(activity.hours) FROM activity ;
>>WHERE activity.employeeno = lcEmployeeno ;
>>INTO array laSum
>>RETURN laSum[1]
>>ENDFUNC
>>
>>HTH,
>>
>>Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform