Others

Change an Access Form Detail Section Height with VBA

John WilsonJohn Wilson Nov 13, 2026 869 views

Question details

The user needs to change the height of an Access form's Detail section from a subform and understand why the visible form size does not change.

Change an Access Form Detail Section Height with VBA
Product
Microsoft Access
Device & OS
not provided
Scenario
A subform runs VBA that changes the Detail section height of a pop-up form.
Observed behavior
The Detail section height changes, but the pop-up form window remains the same size and the change may not be visible.
Before you start

Open the pop-up form and confirm its name in the Navigation Pane. In the VBA editor, press Ctrl+G to open the Immediate window so you can check the section height while the form is open.

Solution 1Recommended

Verify the Detail section height and check scroll bars

Use this approach to confirm that the VBA property changed and make content accessible when the section extends beyond the visible form area.

Section(0) refers to the Detail section. Its Height property is measured in twips and does not control the overall pop-up window size.

1
Set the section height

In the subform's VBA procedure, use Forms![frm_BusinessContact].Section(0).Height = 2300, replacing frm_BusinessContact with the name of your open pop-up form.

2
Check the current value

In the VBA editor, press Ctrl+G and enter ?Forms![frm_BusinessContact].Section(0).Height in the Immediate window. Press Enter to display the current height in twips.

3
Review scroll bar settings

Open the form in Design View, select the form using the selector at its upper-left corner, and open the Property Sheet. On the Format tab, check the Scroll Bars property and choose Vertical or Both if users need to scroll through the form.

4
Test the form again

Open the form in Form View, run the subform's VBA action, and use the vertical scroll bar if the changed Detail section extends beyond the visible area.

Verify the Detail section height and check scroll bars
Runtime changes: A height changed while the form is running is not necessarily reflected in the saved Design View layout. Check the property in the Immediate window while the form is open.
Free Microsoft Office alternative

Use WPS Office for everyday Office documents

WPS Office is a free, lightweight alternative for documents, spreadsheets, and presentations. Its familiar interface and Microsoft Office format compatibility make it easy to move everyday files. Microsoft Access is still required to edit Access forms or run their VBA code.

Work with common Microsoft Office formats, including DOCX, XLSX, and PPTXUse a familiar interface for everyday document tasksOpen and edit spreadsheet data outside your Access workflowInstall a lightweight office suite with free tools
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't changing Section(0).Height resize my Access form?

Section(0).Height changes the Detail section, not the form window. To resize the active pop-up window, activate the form and use DoCmd.MoveSize with the desired width and height.

How can I confirm that the VBA code changed the Detail section height?

With the form open, press Ctrl+G in the VBA editor and enter ?Forms![frm_BusinessContact].Section(0).Height in the Immediate window. Replace the form name and press Enter to see the value in twips.

Where can I enable scroll bars on the form?

Open the form in Design View, select the form, and open the Property Sheet. On the Format tab, set Scroll Bars to Vertical or Both, then test the form in Form View.

Can WPS Office edit an Access form or run its VBA code?

No. Use Microsoft Access to edit the form and run its VBA code. WPS Office can be used separately for compatible documents, spreadsheets, and presentations.