Others

Resize Text for Long Names in Microsoft Access Reports

Ayan MasoodAyan Masood Nov 25, 2026 868 views

Question details

The user wants long names in a fixed-width Access report text box to use a smaller font so they can fit on one line.

Resize Text for Long Names in Microsoft Access Reports
Product
Microsoft Access
Device & OS
not provided
Scenario
A report displays names of varying lengths in a fixed-width text box.
Observed behavior
Long names do not fit in the text box, and the Can Grow property expands the control vertically rather than shrinking its font.
Before you start

Open the report in Design View and identify the name of the text box that displays the names. Decide which font sizes and character-length threshold you want to test.

Solution 1Recommended

Change the text box font size in the Detail Format event

Use a VBA event procedure to apply a smaller font to names above a chosen length.

This approach changes the font size based on character count, not the actual rendered width. Adjust the threshold and sizes after testing representative names.

1
Open the Detail event settings

In the Navigation Pane, right-click the report and select Design View. Select the Detail section, open the Property Sheet, and choose the Event tab.

2
Create the Format procedure

Set On Format to [Event Procedure], then click the ellipsis button to open the VBA editor.

3
Add the font-size logic

In the Detail_Format procedure, add the following code, replacing txtName with the actual text box control name: Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) If Len(Nz(Me!txtName.Value, "")) > 5 Then Me!txtName.FontSize = 6 Else Me!txtName.FontSize = 8 End If End Sub

4
Test the report

Save the report and open it in Print Preview. Check short and long names, then return to the VBA editor to adjust the threshold or font sizes as needed.

Change the text box font size in the Detail Format event
Check the result in Print Preview: The Format event is intended for report formatting and does not run in Report View. A character-count threshold cannot guarantee that every name will fit because characters have different widths.
Free Microsoft Office alternative

Create Documents and Spreadsheets with WPS Office

WPS Office is a free, lightweight Office alternative with a familiar interface and Microsoft Office format compatibility for an easier transition. It does not run Microsoft Access report events or replace this Access-specific fix.

Create and format text in documents and spreadsheetsCompatible with Microsoft Word, Excel, and PowerPoint formatsUse a familiar interface to move between Office-style toolsWork with a free, lightweight office suite
QA img-9

Frequently Asked Questions

Does Can Grow make the font smaller in an Access report?

No. Set Can Grow in the text box Property Sheet to allow the control to expand vertically; it does not automatically reduce the font size.

Where do I find the Detail section's Format event?

Open the report in Design View, select the Detail section, and open Property Sheet > Event. Set On Format to [Event Procedure] and click the ellipsis to edit the VBA.

Why does the font size stay the same in Report View?

The Format event does not run in Report View. Save the report and use Print Preview to test the event procedure.

Will a character-count threshold make every name fit?

Not necessarily. Characters have different widths, so test names in Print Preview and adjust the threshold, font size, or text box width as needed.