Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can you call a function with a return value in a GRID.
Message
From
18/12/1997 16:21:12
 
 
To
18/12/1997 16:12:47
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00067055
Message ID:
00067065
Views:
26
>>>I would like to have a certain value in a text box
>>>field in a GRID. Can I get this value by calling a function
>>>that returns a value to this textbox?
>>
>>Robert-
>>you can do what you want to do, but I think that you are approaching the issue from the wrong direction. A textbox in a grid is a bound control. This means that it shows the contents of the field that it is bound to, and that changes made to the value of the control are also made to the underlying data. What you really want to do is change the value of the field that the textbox is tied to. If the controlssource for the column that contains the textbox is a calculated field, then put your logic in the calculation. If the value you want to change is for a specific record, then perform your calculations (function or whatever) on that field for that record. HTH
>Hi Erik and that does help.. I want my controlssource to be a calc value,
>but I do not know where to put the code. Can I call a function from
>the controlssource?

I don't see why not. I use alltrim()and str() in controlsource all the time, and they're functions. Give it a try.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform