Others

Resize a Microsoft Access Subform to Show All Records and a New Row

Huma Ashraf ChHuma Ashraf Ch Nov 20, 2026 869 views

Question details

Resize a subform so all child records and one new-record row are visible.

Resize a Microsoft Access Subform to Show All Records and a New Row
Product
Microsoft Access
Device & OS
not provided
Scenario
A parent form contains continuous-form or datasheet subforms whose child record counts vary.
Observed behavior
The desired subform height changes with the number of child records while leaving room for a new-record row.
Before you start

Open the parent form in Design View and identify the subform control's Name property on the Property Sheet; it may differ from the source form's name. Check the row height and make sure the subform permits additions if you need a blank new-record row.

Solution 1Recommended

Resize the subform control with the parent form's Current event

Use this approach to adjust the subform height when you navigate between parent records.

Access measures control height in twips: 1,440 twips equal one inch. The example uses 360 twips per row; adjust this value and add space for headers or other non-row areas as needed.

1
Open the parent form event

Open the parent form in Design View, select the form, and open the Property Sheet. On the Event tab, select On Current, click the Build button, and choose Code Builder if prompted.

2
Add the VBA code

Between the existing Form_Current procedure lines, add: Dim rs As DAO.Recordset Dim lngRows As Long Set rs = Me.NameOfSubformControl.Form.RecordsetClone If Not (rs.BOF And rs.EOF) Then rs.MoveLast lngRows = rs.RecordCount End If Me.NameOfSubformControl.Height = (lngRows + 1) * 360 rs.Close Set rs = Nothing

3
Set the control name and height

Replace both instances of NameOfSubformControl with the subform control's Name property. Change 360 to the actual row height in twips, and add any extra height needed for headers.

4
Test the form

Save the form, open it in Form View, and navigate between parent records. Confirm that the child rows and the blank new-record row fit; adjust the height calculation or available space if needed.

Resize the subform control with the parent form's Current event
Display and refresh limits: The new-record row appears only when additions are allowed and the subform's record source is updatable. The parent form must have enough space for the expanded control. The Current event runs when the parent record changes, so adding or deleting child records may require rerunning the resize logic.
Free Microsoft Office alternative

Review Access data in WPS Spreadsheets

WPS Office is a free, lightweight alternative with a familiar interface and Microsoft Office format compatibility. Export Access data to an Excel workbook or CSV file, then open it in WPS Spreadsheets for a straightforward transition to spreadsheet-based review. WPS does not resize Access subforms or run Access forms and VBA.

Review exported child records in a spreadsheetOpen and edit Microsoft Excel XLSX filesUse a familiar interface for spreadsheet workWork with free, lightweight office software
microsoft office alternative - wps office

Frequently Asked Questions

Where do I find the subform control name?

In the parent form's Design View, select the subform control and open its Property Sheet. Use the Name property, which may differ from the source form name.

Why is the blank new-record row missing?

Check the subform's Allow Additions property and whether its record source is updatable. A blank row is not available when users cannot add records.

Why are some rows still hidden after resizing?

The calculation may need extra height for column headers or other non-row areas. Also check that the parent form has enough room for the expanded subform control.

Will the subform resize immediately after I add a child record?

Not necessarily. The parent form's On Current event runs when the current parent record changes; to update the height after child records are added or deleted, rerun the resize logic from an appropriate child-form event.