Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ComboBox Length
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00147594
Message ID:
00147726
Vues:
32
>Hello All,
>On a form there is a combo box that is populated through
>an SQL command calling for the alltrim(value). Upon clicking
>down on the comboBox, the width seems to be associated with the actual
>length of the field in the table, even though the controlsourcce is not set nor is there any actual connection with the table.
>
>How can I control the width. I've tried columnwidths but to no avail
>
>Thanks,
>
>Sandy

Sandy,

Using ALLTRIM() in SQL code is an invitation to disaster. The SQL puts the width of the final column to the width of the first record it processes. If this is a name, your column will vary from 2 characters if the initial name is 'NG' to 14 if the name is 'Christopherson' And if it's 2, you're going to have a LOT of 2-char names showing.

If you need to use AllTrim() to concatenate fields correctly, then please expand the final result to a fixed width with padr().

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform