Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date Field Will Not Appear in a Combo Box
Message
De
20/12/2001 20:57:09
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, Royaume Uni
 
 
À
20/12/2001 20:24:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00597107
Message ID:
00597113
Vues:
14
>Why is it that I cannot have a date field initially selected in a combo box. All I want to have is the value from a field displayed in the combo box without having to select it (it's blank when I run the form). I don't even need to set the control source as the purpose is only a read-only lookup. I have tried to put in the 'Init' of the form the following:
>
> ThisForm.cboHistory.Value = PenStatView.StatusDate
> ThisForm.cboHistory.Refresh()
>
>I've also tried in the 'Init' of the control:
>
> This.Value = PenStatView.StatusDate
> This.Refresh()
>
>I get a message saying: "Error: Value - Data Type Mismatch. Unbinding object cboHistory."
>
>What should I do?


Hi Jim,

For a combo, the value must be either numeric or character.

For the read-only effect that you want, you could use:
* combo Init() code
THIS.Additem( DTOC(PenStatView.StatusDate))
THIS.ListIndex = 1
Regards
Mark

Microsoft VFP MCP
Menulib - OO Menus for VFP www.hidb.com/menulib
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform