General information
Category:
Forms & Form designer
>How come I always get wierd problems?
>
>Ok, on a form I've created a complex custom "grid" in an app under VFP5. If a toggle is set on in a line on the grid, upon activation of the line the following code is executed (part of an EnableRow method):
>
>TVar = "thisform.DescLine.ControlSource = S["+alltrim(str(CurrRow))+",18]"
>&TVar
>TVar = "thisform.InfoLine.ControlSource = S[" + alltrim(str(CurrRow))+",20]"
>&TVar
>
>The first one works just fine; the second blows up on the second &TVar line (consistently) with:
>"The DataSource for this object must be a variable reference".
>
>In this particular case (doesn't matter though) CurrRow = 1 and TVar is equal to the expected
>
>"thisform.InfoLine.ControlSource = S[1,20]"
>
>according to the debugger. Of course, S[1,20] is defined and equal to a short character string. To me this makes no sense because the first example works just fine. Any thoughts on what the heck VFP is doing?
What does S[1,18] equal?
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only