Share via

Rookie needs help: Calling Function in a Module --ConcatRelated

katzen 40 Reputation points
2026-01-08T00:50:21.25+00:00

I have a table "t Individual Items", shown below, for which I want to create a report with only two fields: {Artist ID] and a concatenated list of mediums for each [Artist ID}.

User's image

I copied Allen Browne's ConcatRelated code (http://allenbrowne.com/func-concat.html) into a module, compiled it, and saved it, calling it "ConcatRelated".

I entered " = ConcatRelated("Medium]","[t Individual Pieces]","[Artist ID] -" & [Artist ID])" as the Control Source of one control on the report form. When I try to view it in Report view, I receive the message "Enter Parameter Value: ConcatRelated". I have also tried it without the parentheses.

I have tried running "Compact and Repair Database", closing and reopening the database, and restarting my computer -- in that order -- after both attempts.

Help! What am I doing wrong? Please help a relative novice who is trying to help out a non-profit.

Microsoft 365 and Office | Access | Other | Windows
0 comments No comments

1 answer

Sort by: Most helpful
  1. Marcin Policht 92,635 Reputation points MVP Volunteer Moderator
    2026-01-08T02:50:03.8433333+00:00

    The function is in a module which name is not the same as the function. Rename the module to anything except ConcatRelated, e.g. basFunctions.

    Open the module, choose File > Save As, rename it. Compile again: Debug > Compile.

    In addition, looks like your syntax also has some typos - missed an opening bracket and = in the criteria.

    Try using this as the report textbox Control Source:

    =ConcatRelated("[Medium]","[t Individual Pieces]","[Artist ID] = " & [Artist ID])
    

    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.