How to Fix Access Cannot Find ConcatRelated Function Error
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.

- 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 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.
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.
Press Alt + F11 while Microsoft Access is open to launch the Visual Basic for Applications (VBA) Editor.
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'.
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.
Format Field Names Correctly with Brackets
Improper syntax in the function arguments, particularly missing brackets around field names with spaces, will cause the expression to fail.
Enable Required VBA Data References
The ConcatRelated function relies on external data object libraries (like ADO or DAO) to read records. These must be manually enabled in the VBA Editor.
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. Download the Software: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Install and Launch: Run the installer, follow the simple on-screen instructions, and launch the application.
- 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.

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.




