logo
search
Others

How to Change a Microsoft Access Report Font Based on a Checkbox

Tauseeq MagsiTauseeq Magsi Oct 10, 2026 868 views

Question details

The user needs to dynamically switch the font of specific text controls in a Microsoft Access report based on a checkbox, in order to display either specialized geometric symbols or standard readable text.

How to Change a Microsoft Access Report Font Based on a Checkbox
Product
Microsoft Access
Device & OS
not provided
Scenario
Generating a report where some records contain geometric-dimensioning-and-tolerancing callouts that require a specialized font, while other records contain ordinary drawing notes that require a standard font.
Observed behavior
When using a standard font, dimensional symbols appear as squares. When using the specialized font exclusively, ordinary text notes become difficult to read.
Before you start

Ensure you have design access to your Microsoft Access database, that your underlying table or query includes a Yes/No (checkbox) field, and that both required fonts are installed on the computer generating the report.

Solution 1Recommended

Use VBA in the Report's On Format Event

Since Access Conditional Formatting does not natively support changing the FontName property, using a simple VBA script in the report's Detail section is the most reliable way to toggle fonts based on a checkbox.

By binding a Yes/No checkbox to your records, you can instruct Access to evaluate each record as it formats the report. If the checkbox is ticked, the code applies the specialized font; otherwise, it defaults to a standard readable font.

1
Add a Checkbox Field to the Table

Open your underlying table in Design View and add a Yes/No field (e.g., 'UseSpecialFont'). Save the table and ensure this field is included in the query driving your report.

2
Open the Report in Design View

Right-click your report in the Navigation Pane and select 'Design View'. Ensure the text box control you want to modify has a recognizable name in the Property Sheet (e.g., 'txtNotes').

3
Access the Detail On Format Event

Click the Detail section background. In the Property Sheet, go to the 'Event' tab, find the 'On Format' property, click the ellipsis (...) button, and choose 'Code Builder'.

4
Write the VBA Code

In the VBA editor, enter code similar to this: If Me.UseSpecialFont = True Then Me.txtNotes.FontName = "CyberMetricsGDT" Else Me.txtNotes.FontName = "Calibri" End If

5
Save and Preview the Report

Save the VBA module and your report. Switch to 'Print Preview' to verify that the font updates dynamically for each record based on the checkbox state.

Use VBA in the Report's On Format Event
Best Practice: Always set a default standard font (like Calibri) in the design view so that new or unchecked records automatically display ordinary text correctly.
Free Microsoft Office alternative

Looking for a Lightweight Alternative to Microsoft Office?

While Microsoft Access is a specialized tool for complex database reports, WPS Office provides a powerful, free alternative for your everyday document, spreadsheet, and presentation needs. Experience seamless compatibility with Microsoft Office formats in a highly efficient suite.

  1. 1. Download and Install: Visit the official WPS website to download the free installation package and complete the quick setup.
  2. 2. Open Your Documents: Launch WPS Office and directly open your existing Microsoft Word, Excel, or PowerPoint files without any conversion.
  3. 3. Enjoy Seamless Compatibility: Edit and save your documents with full format retention, utilizing a familiar and intuitive interface.
Free and lightweight alternative to Microsoft OfficeHigh compatibility with Microsoft Word, Excel, and PowerPoint formatsAll-in-one workspace for documents, spreadsheets, PDFs, and presentationsFamiliar user interface with zero learning curve for seamless migration
microsoft office alternative - wps office

Frequently Asked Questions

Why do my special dimensional symbols appear as blank squares in Access?

This happens when the currently applied font (like Calibri or Arial) does not support the specific unicode characters or symbols used in your record. Switching to a specialized font designed for those symbols resolves the issue.

Can I use standard Conditional Formatting instead of VBA to change fonts?

While the Access Conditional Formatting feature easily handles font color, bold, italics, and background colors, it does not allow you to dynamically change the actual font family (FontName). You must use a VBA script in the formatting events to achieve this.

Will the custom font display correctly if I export the Access report to PDF?

Yes, as long as the specialized font is installed on the computer generating the PDF and is not restricted from embedding. The PDF engine will embed the font characters, preserving the correct symbols.