logo
search
VBA & Macro Problems

How to Fix Access Cannot Find ConcatRelated Function Error

Aamir Naveed AkramAamir Naveed Akram Sep 29, 2026 869 views

Question details

The user needs to resolve an error in Microsoft Access where the ConcatRelated function is treated as a parameter instead of a recognized function in a report.

Fix: Microsoft Access Cannot Find ConcatRelated Function in a Report
Product
Microsoft Access
Device & OS
not provided
Scenario
Using the custom VBA ConcatRelated function within an Access report expression to concatenate field values based on specific criteria.
Observed behavior
Access fails to recognize the ConcatRelated function, erroneously treating it as an unknown parameter and preventing the report from running correctly.
Before you start

Before making changes to the VBA editor or modifying module properties, ensure you create a backup copy of your Access database file to prevent accidental data loss.

Solution 1Recommended

Rename the Module and Declare Function as Public

Access cannot distinguish between a VBA module and a function if they share the exact same name. Renaming the module and ensuring the function is public is the most common fix.

If you copied the ConcatRelated code from an external source, you might have named the module 'ConcatRelated'. This naming conflict causes Access to treat the function call as an undefined parameter.

1
Open the VBA Editor

Press Alt + F11 while Microsoft Access is open to launch the Visual Basic for Applications (VBA) Editor.

2
Rename the Standard Module

In the Project Explorer pane on the left, locate the module currently named 'ConcatRelated'. Right-click it, select 'Properties', and change the 'Name' property to something else, such as 'modConcatRelated'.

3
Set Function to Public

Open the code inside the module and ensure the function declaration begins with 'Public Function ConcatRelated' so that it is accessible globally throughout your database reports.

Recompile the Database: After renaming the module, click 'Debug' > 'Compile [Your Database Name]' in the top menu to verify that there are no remaining syntax errors.
Free Microsoft Office alternative

Need a Reliable and Free Office Suite? Try WPS Office

While Microsoft Access handles complex databases, dealing with VBA errors can be frustrating and time-consuming. For your daily document, spreadsheet, and presentation tasks, WPS Office offers a free, lightweight, and highly compatible alternative to Microsoft Office. Enjoy a familiar interface without the expensive subscription.

  1. 1. Download the Software: Visit the official WPS Office website and download the free installation package for your operating system.
  2. 2. Install and Launch: Run the installer, follow the simple on-screen instructions, and launch the application.
  3. 3. Open Your Existing Files: Easily drag and drop your exported database reports or existing Office files into WPS Office to continue your work seamlessly.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats (.docx, .xlsx, .pptx).Lightweight software that installs quickly and runs smoothly without consuming heavy system resources.Advanced spreadsheet tools and formula support for extensive data analysis.Built-in PDF editing suite to manage, convert, and annotate documents effortlessly.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Microsoft Access treat my VBA function as a parameter?

Access treats a function as an undefined parameter when it cannot locate the function in its compiled code. This most commonly happens if the VBA module has the exact same name as the function itself, or if the function is declared as 'Private' instead of 'Public'.

How do I write field names with spaces in an Access expression?

Whenever a field name or table name contains spaces in Microsoft Access, you must enclose it in square brackets. For example, a field named 'Artist ID' must be written as '[Artist ID]' within your expressions and VBA arguments.

What VBA references do I need for custom recordset functions?

Custom functions that iterate through records, like ConcatRelated, usually require either the Microsoft ActiveX Data Objects (ADO) library or the Microsoft Office 16.0 Access database engine Object Library (DAO). You can enable these by opening the VBA Editor and navigating to Tools > References.