Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ComboBox ListIndex - Syntax Error
Message
De
08/05/2007 12:34:57
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01223409
Message ID:
01223464
Vues:
29
>>>>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!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform