Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBox Length
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00147594
Message ID:
00147726
Views:
31
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform