Style Property

Microsoft Access Visual Basic

expression.Style

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

Remarks

The Style property uses the following settings.

Setting Visual Basic Description
Tabs 0 (Default) Tabs appear as tabs.
Buttons 1 Tabs appear as buttons.
None 2 No tabs appear in the control.

Note  You can set the Style 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.

You can set the Style property in any view.

When the tab control's Style property is set to Tabs or Buttons, the appearance of the tabs is determined by the TabFixedHeight , TabFixedWidth , and MultiRow properties.

You could set the tab control's Style property to None if you wanted complete control over when a user could move between tabs. In prior versions of Microsoft Access, wizard dialogs were created by using multiple-page forms. You can now use a tab control create your own wizard with each page of the wizard contained on a separate page of a tab control with its Style property set to None.

Example

The following example causes tabs to appear as buttons on the tab control named "TabCtl1" on the "Mailing List" form.

Forms("Mailing List").Controls("TabCtl1").Style = 1