Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo Boxes
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00236835
Message ID:
00237127
Vues:
22
>Way back when I was starting out in vfp I found I had problems getting combo boxes to display the correct data so made the gotfocus() method look like this.
>
>this.rowsourceType = 3
>this.rowsource = lcSqlQuery + "into cursor cSql"
>this.value = table.fieldvalue
>this.displayvalue = Lookup( cSql.display, this.value, cSql.Id)
>
>if empty(this.displayvalue)
> *// put in the default values
>endif
>
>I've tried to make this as readable as possible. Is this a correct approach or have my initial problems led me off in the wrong direction?
>
>Sarah

Just to add to my own message. I think the big problem is the the combo is in a GRID and it's not picking up the right (individual) record ids. Both combo's show the same data even though the records have different values.

I think I need the code to be in gotfocus method because the drop down contents are dependant on other fields (ie not static). However the grid is just pointing to one record but refreshes the combo for every line with the same data.

Sarah
Sarah King
pcpropertymanager.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform