concatenate field in a query

S

Slez

I'm trying to concatenate some data so that it can be displayed in a report,
so I created a field in the source query with the following expression:

Clients: Concatenate("SELECT GCName FROM tblProjectClient WHERE ProjectID ="
& [ProjectID])

When I run the query, I get the error message "The specified field '
[ProjectID]' could refer to more than one table listed in the FROM clause of
your SQL statement." I tried adding Project. (which references the
table) to one, the other, and then both references to ProjectID, only to get
an error message "Undefined function 'Concatenate' in expression."

I was trying to adapt this from a generic concatenation function located at
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane

Can anyone offer a suggestion as to what might be causing the errors, or what
might need to be altered in my expression to make this work?
Thanks in advance!
Slez
 
J

Jason Lepack

You probably have two (or more) tables displayed in the Query Designer
that have [ProjectID] in them. You need to tell it which table you
want to take [ProjectID] from.
 
J

Jason Lepack

You probably have two (or more) tables displayed in the Query Designer
that have [ProjectID] in them. You need to tell it which table you
want to take [ProjectID] from.

Your field info would then be:
Clients: Concatenate("SELECT GCName FROM tblProjectClient WHERE
ProjectID ="
& yourtablename.[ProjectID])
 
S

Slez via AccessMonster.com

That's exactly what I tried, but I got that error message "Undefined function
'Concatenate' in expression. Seems like it should work...is there any other
properties, settings, etc. that I need to look at?
Thanks
Slez

Jason said:
You probably have two (or more) tables displayed in the Query Designer
that have [ProjectID] in them. You need to tell it which table you
want to take [ProjectID] from.

Your field info would then be:
Clients: Concatenate("SELECT GCName FROM tblProjectClient WHERE
ProjectID ="
& yourtablename.[ProjectID])
I'm trying to concatenate some data so that it can be displayed in a report,
so I created a field in the source query with the following expression:
[quoted text clipped - 15 lines]
Thanks in advance!
Slez
 
J

Jason Lepack

Do you actually have a function created called "Concatenate"? I notice
that in Duane Hookom's database he has a Module that has the function
Concatenate, did you copy that module into yours.

That error says that within your database there is no function called
concatenate.

Cheers,
Jason Lepack

Did you add in the module that has the concatenate function into your
database.
Slez said:
That's exactly what I tried, but I got that error message "Undefined function
'Concatenate' in expression. Seems like it should work...is there any other
properties, settings, etc. that I need to look at?
Thanks
Slez

Jason said:
You probably have two (or more) tables displayed in the Query Designer
that have [ProjectID] in them. You need to tell it which table you
want to take [ProjectID] from.

Your field info would then be:
Clients: Concatenate("SELECT GCName FROM tblProjectClient WHERE
ProjectID ="
& yourtablename.[ProjectID])
I'm trying to concatenate some data so that it can be displayed in a report,
so I created a field in the source query with the following expression:
[quoted text clipped - 15 lines]
Thanks in advance!
Slez
 
S

Slez via AccessMonster.com

Ah-ha! I had NOT copied that module. Doing so made it work perfectly!
Thanks for setting me straight!
Slez

Jason said:
Do you actually have a function created called "Concatenate"? I notice
that in Duane Hookom's database he has a Module that has the function
Concatenate, did you copy that module into yours.

That error says that within your database there is no function called
concatenate.

Cheers,
Jason Lepack

Did you add in the module that has the concatenate function into your
database.
That's exactly what I tried, but I got that error message "Undefined function
'Concatenate' in expression. Seems like it should work...is there any other
[quoted text clipped - 20 lines]
Message posted via AccessMonster.com
 

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