Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ComboBox behavior with integer key
Message
 
À
22/07/1999 09:13:07
Rex Mahel
Realm Software, Llc
Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00244085
Message ID:
00244656
Vues:
19
I don't think I can be of any help. I looked at a combobox I have running that is similar to yours (integer key, etc.). The only difference is my ControlSource, which is integer field in a view, rather than a form property.

>Properties are as follows:
>
> BoundColumn = 2, ;
> ColumnCount = 2, ;
> ColumnWidths = "150,0", ;
> RowSourceType = 6, ;
> RowSource = "v_VaccineLookUp.cName,iId", ;
> ControlSource = "ThisForm.iVaccineId", ;
> Height = 24, ;
> ColumnLines = .F., ;
> Left = 137, ;
> Top = 113, ;
> Width = 100, ;
> BoundTo = .T., ;
> Name = "Combo1"
>
>v_VaccineLookUp structure:
> cName c(30)
> iId i
>
>Any other ideas?
>
>TIA
>
>Rex
>
>>Do you have the BoundColumn property set to 2?
>>
>>>Thanks Jim.
>>>
>>>OK, I set the BoundTo to .T. and the default value shows correctly. Now when I select another value in the Combo, the displayvalue is blank. If I change the BoundTo to .F. after the initial Combo.Requery, the display is correct. I shouldn't have to switch the BoundTo property on and off programmatically, should I.
>>>
>>>What am I missing?
>>>
>>>TIA
>>>
>>>Rex
>>>
>>>>Rex,
>>>>
>>>>If you want to use an integer as the controlsource for a combo, you must set the BoundTo property to .T. or else the combo uses its ListIndex instead of the value of the boundcolumn for the inteer value.
Chris McCandless
Red Sky Software
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform