Hi John,
I tried to execute the query exactly as you described, but when the table
pulls up i am getting an error (error # 3464) message in the criteria # met
field for each line that there is a customer record. Example to follow:
Criteria # Met Customer Record #
ERROR# 0001234
ERROR# 0002345
ERROR# 0003456
Not sure what I am doing wrong, any suggestions?
:
The function should work fine with numbers. I would expect your query
string too look something like the following.
SELECT DISTINCT Concatenate("SELECT [Criteria # Met] FROM
[YourTableName] WHERE [Customer Record #] = """ & [customer Record 3] &
"""",",") as CriteriaMet
, [Customer Record #]
FROM [YourTableName]
In the grid:
Field: CriteriaMet: Concatenate("SELECT [Criteria # Met] FROM
[YourTableName] WHERE [Customer Record #] = """ & [customer Record 3] &
"""",",")
-- In query properties set Unique Fields to Yes.
'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
Ned Lottsa Help wrote:
Hi John,
I found and loaded the module to my DB and it is still not quite working.
What I am trying to do is concatenate a group of criteria identifiers to
customer records. One customer record could have multiple criteria
identifiers. Example:
Criteria # Met Customer Record #
1 0001234
2 0001234
5 0001234
3 0002345
7 0002345
9 0002345
Here is how I want the records to appear:
Criteria # Met Customer Record #
1,2,5 0001234
3,7,9 0002345
The example from Duane's access database for concatenation seems to refer to
names as part of the example, but i need to concatenate numbers to numbers.
Is there a way to be able to do this? Thanks again for your help.
:
Did you find and download the code for the concatenate function?
Did you name the module differently than the function? You should.
Concatenate function is at
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
I tried to use this code and I get an error 3085 message that states:
"Undefined function <name> in expression. (Error 3085)". Can you help me
to
resolve? I checked the references and I have the Visual Basic for
Applications, Microsoft Access 11.0 Object Library, OLE Automation,
Microsoft
DAO 3.6 Object Library and the Microsoft ActiveX Data Objects 2.5 Library
all
checked. Is there something that I am missing?
Thank you.
SNIP