Concatrelatd () function

mansied

Member
Local time
Yesterday, 23:23
Joined
Oct 15, 2020
Messages
100
Hello
I need help in concatenating a string field in rows :

1632194252264.png


I want to do group by AC Model and Ac Serial,then concatenate all AC event text strings for it together.
Can you provide me a solution ?
Thank you
 
Hi. It might be easier if you could post a sample db. Take a look at this simple function.

 
ConcatRelated() function doesn't work in query.it is unknown
 
ConcatRelated() function doesn't work in query.it is unknown
Really?
Code:
Expr1: ConcatRelated("CrewName","QryCrewStudy","QryCrewStudy.Rank = """ & [Rank]![Rank] & """ AND QryCrewStudy.On_Date = #" & Format([Dated],"mm/dd/yyyy") & "#","CrewNameRev")
1632209641298.png
 
ConcatRelated() function doesn't work in query.it is unknown
It is not a built-in access SQL function, but you need to make a user defined function.
See @arnelgp link to get a useable function
 
Really?
Code:
Expr1: ConcatRelated("CrewName","QryCrewStudy","QryCrewStudy.Rank = """ & [Rank]![Rank] & """ AND QryCrewStudy.On_Date = #" & Format([Dated],"mm/dd/yyyy") & "#","CrewNameRev")
View attachment 94630
Why it doesn't work for me ?
I want to do group by Aircraft Type,Aircraft Manufacturer Serial Number,and Event Type fields then concatenate Aircraft Event Text (Corrective Action) field.
Can you help how to do that ?
Thank you
 

Attachments

Why it doesn't work for me ?
I want to do group by Aircraft Type,Aircraft Manufacturer Serial Number,and Event Type fields then concatenate Aircraft Event Text (Corrective Action) field.
Can you help how to do that ?
Thank you
Hi. Your expression appears to be trying to concatenate the "CrewName" column from a query called "QryCrewStudy." Looking at the file you posted, I don't see that query, nor do I see a column called CrewName in your table.

1632253049277.png


Can you please use Excel to mockup some sample data? One side shows the original data, as they exist in your table, and the other side showing what you want as the result of combining them together. Thanks.
 
@theDBguy
The crewname code is mine, from my bibbys db, just to show the OP that the function does work in a query.?
 
I added two tables to see what i expect to be the result .
Thank you
1632254789508.png
 
You did not even include the function code in db. Making it hard for us to help you.
 
@theDBguy
The crewname code is mine, from my bibbys db, just to show the OP that the function does work in a query.?
@theDBguy
The crewname code is mine, from my bibbys db, just to show the OP that the function does work in a query.?
Expr1: ConcatRelated("CrewName","QryCrewStudy","QryCrewStudy.Rank = """ & [Rank]![Rank] & """ AND QryCrewStudy.On_Date = #" & Format([Dated],"mm/dd/yyyy") & "#","CrewNameRev")

Could you express this code ? which one is the field were grouped by , what is table or query name and which field was concatenated???
 
Review the function notes? all the details are there?
Why not try theDBguy's version, if you are struggling with AB's
 

Users who are viewing this thread

Back
Top Bottom