Where did you copy the code for fConcatFld?
It must be in a stand-alone module (as opposed to a Class module or a module
associated with a report or form)
--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
Co-author: Access 2010 Solutions, published by Wiley
(no e-mails, please!)
"Katie Fitzpatrick" <(E-Mail Removed)> wrote in message
news:48993a86-2394-4148-bd83-(E-Mail Removed)...
> Hello all -
>
> I *know* this has been covered many places, but my hours of searching
> has yielded me no resolution to what I imagine is a pretty simple
> problem.
>
> I have one table: Sample
> There two columns I'm interested in are: UserId and Role
> I am (attempting) to use Dev Ashish's fConcatFld function to produce a
> simple select statement that would produce the following:
>
> Before:
>
> UserID Role
> Sam ABC System
> Sam XYZ System
> Joe ABC System
> Joe ABC System Admin
> Sam ABC Admin
>
> After:
>
> UserID Role
> Sam ABC System, XYZ System, ABC Admin
> Joe ABC System, ABC System Admin
>
>
> I followed the instructions to enter a code window, insert a module,
> pasted the code, ran compile under the debug menu.
>
> Then I entered the following into a query:
>
> SELECT Userid, fConcatFld("Sample","UserID","Role","string",[Userid])
> AS Roles
> FROM Sample
> GROUP BY [Userid];
>
> The error I receive is as follows:
>
> "Undefined Function 'fConcatFld" in expression"
>
> The function is declared as public - what am I missing?
>
> Thank you so much for your assistance with this question.