Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo Box : Not showing values unless focus is set to it
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00145892
Message ID:
00146091
Vues:
38
>>Paul,
>>That will ALWAYS show the first item in the combo list. If the combo is linked to a table with ControlSource, then this will change the data in the table.
>>
>>First Jayesh should check if there is an exact match (as JimB. suggests) and then add
>>
>>thisform.Mycombo.value = Mytable.Combofield
>>
>>Where the 'combofield' refers to the value in the field linked to the combo.
>>
>>HTH
>>Barbara
>>
>>>Try
>>>
>>>THIS.LISTINDEX = 1
>>>
>>>in the init of the control.
>>>
>>>HTH
>So you're saying this is bad advice? I was under the impression he was trying to display the first item in the list when the form loaded. I have used this method (ummm _style_) in the past (admittedly w/o a ControlSource) though I ususally set the ListIndex=1 in the init of the form - after the combo control is present and I've generated a cursor to populate the combo.
>I do apologize if my advice was wrong.

Paul,
It is certainly not wrong. IF your combo is NOT linked to a table via its controlsource then your method is correct. If it IS linked to another table, then your method will change the value in the table for the 'first' record.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform