An opened form is displayed in one of severelal form views. Each of these form views are listed in the acFormView enumeration:
acDesign
1
Design view
acFormDS
3
Datasheet view
acFormPivotChart
5
PivotChart view
acFormPivotTable
4
PivotTable view
acLayout
6
Layout view
acNormal
0
Form view, this is the default
acPreview
2
Print Preview.
These ac… correspond to the second parameter in doCmd.openForm…
Section
A form consists of a few sections. In order to address a specific section, the section(index) property must be used. index is an enum that lists each section:
acDetail
0
acHeader
1
acFooter
2
acPageHeader
3
acPageFooter
4
For example, the width property of a form can be set with frmObj.width = …, but the height property must be set in the form's detail section: frmObj.section(acDetail).height = ….
Showing/hiding the header and footer section
With VBA, the visibility of the header and footer section can be toggled with
In the GUI, the corresponding functionality is executed by right clicking the Detail «bar» above the form and then choosing Form Header/Footer:
Controls on a form
The controls on a form are accessible via its controls property.
Because this property is the default property of form, it can be omitted when referring to a control. Both of the following two statements are equivalent: