Section Property

Applies To

Bound Object Frame Control, Chart Control, Check Box Control, Combo Box Control, Command Button Control, Form, Label Control, Line Control, List Box Control, Option Button Control, Option Group Control, Page Break Control, Rectangle Control, Report, Subform/Subreport Control, Text Box Control, Toggle Button Control, Unbound Object Frame Control.

Description

You can use the Section property to identify a section of a form or report and provide access to the properties of that section. You can also identify controls by the section of a form or report where the control appears.

Setting

The Section property is an Integer data type value corresponding to a particular section.

Setting

Description

0

Form detail section or report detail section

1

Form or report header section

2

Form or report footer section

3

Form or report page header section

4

Form or report page footer section


Setting

Description

5

Group-level 1 header section (reports only)

6

Group-level 1 footer section (reports only)

7

Group-level 2 header section (reports only)

8

Group-level 2 footer section (reports only)


If a report has additional group-level sections, the header/footer pairs are numbered consecutively beginning with 9.

The Section property is read-only in all views.

For forms and reports, the Section property is an array of all existing sections in the form or report specified by the section number. For example, Section(0) refers to a form’s detail section and Section(3) refers to a form’s header section.

You can also refer to a section by name. The following statements refer to the Detail0 section for the Customers form and are equivalent.


Forms![Customers].Section(0).Visible![Customers].Detail0.Visible

Remarks

For forms and reports, you must combine the Section property with other properties that apply to form or report sections. The following example shows how to refer to the Visible property of the page header section of the Customers form.


Forms![Customers].Section(3).Visible

For controls, you can use the Section property to determine which section of a form or report a control is on. The following example uses the Section property to determine which section contains the CustomerID control.


Dim intSectionNumber As Integer= Forms![Customers]![CustomerID].Section

See Also

CanGrow, CanShrink Properties; Event Properties; FillColor Property; ForceNewPage Property; Height, Width Properties; KeepTogether Property—Sections; NewRowOrCol Property; SpecialEffect Property; Visible Property (Microsoft Access).