ListWidth Property

ListWidth Property

See Also                  Applies To

You can use the ListWidth property to set the width of the list box portion of a combo box.

Setting

The ListWidth property holds a value specifying the width of the list box portion of a combo box in inches or centimeters, depending on the measurement system (U.S. or Metric) selected in the Measurement System box on the Number tab of the Regional Settings Properties dialog box of Windows Control Panel. To use a unit other than the default, include a measurement indicator, such as cm or in. The default setting (Auto) makes the list box portion of the combo box the same width as the combo box.

You can set the ListWidth property by using the combo box's property sheet, a macro, or Visual Basic.

For table fields, you can set this property on the Lookup tab of the Field Properties section of table Design view for fields with the DisplayControl property set to Combo Box.

Tip   Microsoft Access sets the ListWidth property automatically when you select Lookup Wizard as the data type for a field in table Design view.

In Visual Basic, use a numeric expression to set the value of this property. The default unit of measurement in Visual Basic is twips.

You can also set the default for this property by using a combo box's default control style or the DefaultControl method in Visual Basic.

Remarks

The list portion of the combo box can be wider than the combo box but can't be narrower.

If you want to display a multiple-column list, enter a value that will make the list box wide enough to show all the columns.

Tip   When designing combo boxes, be sure to leave enough space to display your data and for Microsoft Access to insert a vertical scroll bar.