Part III: More-Advanced Access Techniques
702
TABLE 19.1
Important Tab Control Properties
Property Description
Caption Applies to each page in the tab control. Provides the text that appears on the tab.
MultiRow Applies to the tab control. Determines whether the tabs appear as a single row or as
multiple rows. You can’t specify how many tabs appear in each row. Instead, Access
adds as many rows as necessary to display all tabs, given their respective widths.
Style By default, tabs appear as tabs. The alternative (Buttons) forces the tabs to appear as
command buttons.
TabFixedHeight This value determines the height (in inches or centimeters, depending on the units
of measurement settings in the Windows Control Panel) of the tabs on the control.
When the TabFixedHeight is set to 0 , the tab height is determined by the size of
the font specified for the tab control.
TabFixedWidth This value determines the width (in inches or centimeters) of the tabs on the control.
Text that is too wide to fit on the tab when the TabFixedWidth value is set is
truncated. When the TabFixedWidth is set to 0 , the width of the tab is deter-
mined by the font size selected for the tab control and the text specified in the tab’s
Caption property.
Picture Applies to each page on the tab control. The Picture property specifies an image
(.bmp, .ico, or built-in picture) to display on the tab.
The tab control itself has a Value property that tells you which tab is selected. Value changes
each time a tab is selected. Figure 19.15 shows frmTabControl2, a form included in
Chapter19.accdb on this book’s companion CD-ROM. This form demonstrates some of the
properties of the tab control and its pages.
FIGURE 19.15
frmTabControl2 in the Chapter19.accdb example database demonstrates important tab control
properties.
The Value property of a tab control indicates which page is currently selected. It returns an inte-
ger that indicates the position of the selected page in the Pages collection. For example, if the first
page in a tab control is selected, the Value property returns 0 , the index number of the first page