Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dreaded Combo Box Behavior
Message
De
03/06/1997 13:42:48
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00034772
Message ID:
00034804
Vues:
42
>>>>>I have a combo box (actually dropdown list (style=2)) listing different types of software to choose from. I populate this dropdown using rowsourcetype=SQL Select and rowsource="SELECT desc FROM software INTO CURSOR query".
>>>>>
>>>>>I want to populate another table (CALLS.DBF) with the value of the selection so I set the controlsource to "calls.softwaredesc".
>>>>>
>>>>>I would like to use this dropdown to serve the dual function of showing what was previously entered, and allowing the user to change the value of what was previously entered. My problem is that is a record that was previously entered has a softwaredesc that is no longer in the software table, it will not show as the value in the dropdown list.
>>>>>
>>>>>Does anyone have any simple workarounds?
>>>>
>>>>I see a problem: why 'previous' record.softwaredesc is no longer in the software table? It's obvious contradictory to data normalization rules.
>>>
>>>For simplicity's sake, I described it that way... but in reality, it is still in the table, just marked as inactive. There may be cases where a piece of software that might have been a valid choice two years ago, is no longer available today, therefore not a valid choice today. We mark that software as inactive (a logical field in the software table) to maintain the data link to historic data, but it still doesn't solve my combo box problem.
>>
>>If your combo includes 'inactive' software too, it shouldn't be a problem to get requested functionality resetting Value property. I ,personally, wouldn't use ControlSource property here.
>
>I tried explicitly setting the value property to the value of calls.softwaredesc, and it still comes up blank. Both with the ControlSource property used and unused.

Is 'previous' softwaredesk in list portion of Combo or not? The basic idea of Combo.Style=2 is that both Combo.Value and DisplayValue going from List portion exclusively. If Style=0 you can use DisplayValue which reflects something you typed in text portion but didn't add to list portion yet.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform