Formatting Issues

How to Align Text and Numbers in Microsoft Access Memo Fields

Adam DavisAdam Davis Oct 22, 2026 869 views

Question details

The user needs to display extracted text and numeric records in neatly aligned columns inside a single Microsoft Access memo or long-text field.

How to Align Text and Numbers in Microsoft Access Memo Fields
Product
Microsoft Access
Device & OS
not provided
Scenario
Displaying structured, tabular data directly inside a memo control instead of standard table columns.
Observed behavior
Rich-text and standard memo fields lack built-in column alignment tools, causing proportional fonts to render text and numbers jagged and misaligned.
Before you start

Before formatting data inside a memo field, consider whether a multi-column List Box or a continuous subform might better serve your display needs, as they offer native tabular alignment without requiring VBA string manipulation.

Solution 1Recommended

Format with a Monospaced Font and Fixed-Length Strings

A monospaced font ensures every character occupies the exact same width, allowing you to pad strings with spaces in VBA to create perfectly aligned columns.

Proportional fonts like Calibri assign different widths to different characters (e.g., an 'i' is narrower than a 'w'). By switching the memo field to a monospaced font like Courier New, you can use VBA to build fixed-width lines and align numeric values seamlessly.

1
Set the Memo Field Font

Open your Access Form in Design View, select the memo field control, and change its Font Name property in the Property Sheet to 'Courier New' or 'Consolas'.

2
Declare Fixed-Length Strings in VBA

In your VBA code module, declare a fixed-length string variable for your column width. For example, type: Dim ColumnValue As String * 24.

3
Format and Pad the Data

Assign your extracted record data to the fixed-length variable. Access will automatically pad the remaining space. Concatenate these strings row by row and assign the final result to the memo control.

Format with a Monospaced Font and Fixed-Length Strings
Right-Aligning Numbers: For numbers, you may need to calculate the length of the number and insert leading spaces using the VBA Space() function before appending the number to your text string.
Free Microsoft Office alternative

Manage Tabular Data Seamlessly with WPS Office

While Microsoft Access requires complex VBA coding to align data in text fields, presenting tabular data is much easier in a dedicated spreadsheet application. Try WPS Office as a lightweight, free alternative to Microsoft Office for organizing, formatting, and analyzing structured data effortlessly.

  1. 1. Download WPS Office: Visit the official WPS website to download the free office suite installer for your operating system.
  2. 2. Install the Suite: Run the installer and follow the quick on-screen instructions to set up WPS Office on your device.
  3. 3. Manage Data in Spreadsheets: Open WPS Spreadsheet to easily align, format, and analyze tabular data natively without writing complex VBA code.
Free, lightweight, and fully featured office suiteNative grid structure eliminates the need for manual text paddingFully compatible with Microsoft Excel (.xlsx) formatsFamiliar user interface with zero learning curve for seamless migration
microsoft office alternative - wps office

Frequently Asked Questions

Why do my columns still look misaligned after padding them with spaces?

If you are using a proportional font (such as Arial, Times New Roman, or Calibri), spaces and letters have varying widths. You must change the memo field control's font property to a monospaced font like Courier New for the padding spaces to line up evenly.

Can I use rich text HTML/CSS tables inside an Access long-text field?

Microsoft Access rich-text fields support a very limited subset of HTML formatting. Standard HTML table tags (like <table>, <tr>, and <td>) are not supported, which is why VBA padding or native List Boxes are required for creating structured column layouts.

How do I right-align numeric values while left-aligning text in VBA?

You can calculate the exact character length of your numeric string, subtract it from your designated fixed column width, and then use the Space() function in VBA to prefix the number with the correct amount of leading spaces before concatenating it to the text string.