Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Hi Geoff.
>> This works fine except when I select the row I want it displays the contents of column 1 instead of column 2 (displays the Stno but I want the Street) in the text portion. <<
This is exactly what I would expect to happen. The combo's DisplayValue (what is displayed when the combo is "closed") always comes from column 1 of its RowSource.
Specifying column 2 as the BoundColumn just tells the ControlSource which column it should update its value from. IMHO, that is what makes combos so useful. We can set the ControlSource to a (surrogate) foreign key value in a lookup table while displaying the meaningful descriptive text that is associated with it.
If you want to display the street number and address in column 1, change the RowSourceType to 3-SQL and change the RowSource to something like this:
SELECT PADR( ALLTRIM( stno ) + ' ' + ALLTRIM( street ), 35 ) DispStreet, stno, strret FROM cust INTO CURSOR fred
and adjust the BoundColumn accordingly.
HTH.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement