Resize a Microsoft Access Subform to Show All Records and a New Row
Question details
Resize a subform so all child records and one new-record row are visible.

- 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.
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.
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.
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.
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
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.
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.

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.

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.




