Create a Procedure in a Standard Module:
Public Function Concat(fldName as String) as String
Dim db as Database, rs as Recordset, strSQL as String
set db = Currentdb
strSQL = "SELECT * FROM myQuery WHERE Name = '" & fldName & "'"
db.openrecordset(strSQL)
rs.MoveFirst
Do While Not rs.EOF
Concat = Concat + rs.Stock + ", "
rs.MoveNext
Loop
Concat = left(Concat,Len(Concat)-2)
set rs = Nothing
set db = Nothing
End Function
Call the procedure with this saved query. Replace myQuery with the actual name of your query in the code above and the SQL below:
SELECT Company, Name, Concat(Name) AS ListOfStocks FROM myQuery
GROUP BY Company, Name;