Hi everyone -
I have been trying to figure out this concatenate thing on my own for two days now and I cannot get it right so I am asking for assistance.
I have found several examples of code to combine one field's contents from two different records but have not been able to get any of them to work for me.
I have a query (qryLeanAssignmentIdeaEmail) that is based on two tables (tblAssignedTo and tblEmailAddresses). Here is the sql behind the query:
SELECT tblAssignedTo.LeanIdeaNumber, tblEmailAddresses.EmailAddress
FROM tblAssignedTo INNER JOIN tblEmailAddresses ON tblAssignedTo.AssignedTo = tblEmailAddresses.Name
WHERE (((tblAssignedTo.LeanIdeaNumber)=[forms]![frmLeanAssignmentForm]![LeanIdeaNumber]));
This query produces an output that looks like this:
LeanIdeaNumber EmailAddress
2 john.doe@email.com
2 jane.doe@email.com
I need to have both emails on one line and separated by a comma. Like this:
LeanIdeaNumber EmailAddress
2 john.doe@email.com, jane.doe@email.com
Can anyone please help me in writing the code to do this? I know it can be done as I have seen many examples with replies that they "worked great" but I can't seem to get it right on my own.
Thank you in advance for your help.
I have been trying to figure out this concatenate thing on my own for two days now and I cannot get it right so I am asking for assistance.
I have found several examples of code to combine one field's contents from two different records but have not been able to get any of them to work for me.
I have a query (qryLeanAssignmentIdeaEmail) that is based on two tables (tblAssignedTo and tblEmailAddresses). Here is the sql behind the query:
SELECT tblAssignedTo.LeanIdeaNumber, tblEmailAddresses.EmailAddress
FROM tblAssignedTo INNER JOIN tblEmailAddresses ON tblAssignedTo.AssignedTo = tblEmailAddresses.Name
WHERE (((tblAssignedTo.LeanIdeaNumber)=[forms]![frmLeanAssignmentForm]![LeanIdeaNumber]));
This query produces an output that looks like this:
LeanIdeaNumber EmailAddress
2 john.doe@email.com
2 jane.doe@email.com
I need to have both emails on one line and separated by a comma. Like this:
LeanIdeaNumber EmailAddress
2 john.doe@email.com, jane.doe@email.com
Can anyone please help me in writing the code to do this? I know it can be done as I have seen many examples with replies that they "worked great" but I can't seem to get it right on my own.
Thank you in advance for your help.