Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculate Max oddity
Message
From
07/03/2001 09:03:39
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00482635
Message ID:
00482652
Views:
9
>>Hi all,
>>
>>I have the following code in a command button of a form (for testing purposes)
>>
>>
>>create cursor fred (fieldname C(10))
>>insert into fred values ('HelloWorld')
>>lcVar = 'fieldname'
>>
>>Select Max(Thisform.TextWidth(AllTrim(eval(lcVar)))) as x from fred
>>Calc Max(TxtWidth(AllTrim(eval(lcVar)))) to lnFieldWidth
>>Calc Max(Thisform.TextWidth(AllTrim(eval(lcVar)))) to lnFieldWidth
>>
>>
>>For some reason the third line (Calc max(Thisform.....) does not work, can anyone explain why?
>>
>>TIA
>
>Do you get error or incorrect result?

It gives an error
Invalid Subscript reference 
Will Jones
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform