Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBox ListIndex - Syntax Error
Message
From
08/05/2007 12:34:57
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01223409
Message ID:
01223464
Views:
17
>>>>In the Init of a ComboBox I have the code below. It gives me an syntax error. This code works for other stuff (it's parent code in a class). The debugger makes it hard to tell, but THIS doesn't seem to be available, but that could just be scoping. I do know that when I get back to the instance (out of the class) THIS is an object, but ListIndex under the object in the watch window shows as "expression could not be evaluated" or whatever. Any ideas? Thanks!
>>>>
>>>>
>>>>THIS.ListIndex = 1
>>>>
>>>
>>>Perhaps you're returning .f. from the Init of this control somewhere earlier in the method.
>>>
>>>Also are you sure you specified valid RowSource and RowSourceType?
>>
>>Somehow got past that - problems in the SQL (using SQL Statement as RowSourceType) - but now I get a little Query browse window popup when I run the form. I assume it is from the SQL in the RowSource of the Combobox, but I'm not sure why it is running like that...
>
>Just add into cursor curForNoUse in your select statement to get rid of the window.

Ok, that worked, not a related question... I always have trouble with these ComboBoxes that display a description, but use a code from a table. For example:
SELECT MyTable.Desc, MyTable.Code FROM MyTable WHERE Blah = Blah INTO CURSOR CurForNoUse
And I want to show the description in the combo, but use the code for processing afterwards. Any insight to how this works best? Thanks!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform