TabFixedWidth Property

Microsoft Access Visual Basic

expression.TabFixedWidth

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

The TabFixedWidth property setting is a value that represents the width of tabs in the unit of measurement specified in the Regional Options dialog box in Windows Control Panel. If you set this property to zero, the tabs automatically adjust to the width of the tab contents.

You can set this property by using the tab control's property sheet, a macro, or Visual Basic.

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

In Visual Basic this property uses a Long Integer value representing the width of the tabs in twips and can be set in any view.

Note  To use a unit of measurement different from the setting in the Regional Options dialog box in Windows Control Panel, specify the unit, such as cm or in (for example, 5 cm or 3 in).

You can't change the color of a tab control. If the tabs don't cover the width of the tab control, the area behind the tabs is displayed. If you place a tab control on an object with a different color than the tab control, you should make sure that the tabs cover the control's background area.

Example

The following example sets the width of each tab in the tab control "TabCtl1" on the "Mailing List" form to 2000 twips.

Forms("Mailing List").Controls("TabCtl1").TabFixedWidth = 2000