Dev Ashish - fConcatFld function assistance

K

Katie Fitzpatrick

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.
 
K

Katie Fitzpatrick

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.

I posted in the incorrect location. I will repost to
microsoft.public.access.queries
 
D

Douglas J. Steele

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)
 
D

David W. Fenton

m:
I posted in the incorrect location. I will repost to
microsoft.public.access.queries

I'd suggest you just post in microsoft.public.access or
comp.databases.ms-access, since the traffic is so much lower now
that MS has stopped participating in them.
 
K

Katie Fitzpatrick

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 MVPhttp://www.AccessMVP.com/DJSteele
Co-author: Access 2010 Solutions, published by Wiley
(no e-mails, please!)




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:

UserID             Role
Sam                ABC System
Sam                XYZ System
Joe                  ABC System
Joe                  ABC System Admin
Sam                ABC Admin

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.

Hi David -

I found the code here: http://www.mvps.org/access/modules/mdl0008.htm

However, I'm not sure that I've created it as a stand-alone module.
How could I check that?
 
K

Katie Fitzpatrick

I'd suggest you just post in microsoft.public.access or
comp.databases.ms-access, since the traffic is so much lower now
that MS has stopped participating in them.

Thanks David - I didn't realize they had stopped participating. I will
make a note for the future.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top