First of all, you must create a module with this code:
Option Compare Database
Public Function Aggregate(value As Integer) As String
Dim retValue As String
Dim db As Database
Set db = CurrentDb()
Dim sql As String
sql = "SELECT * FROM T WHERE QuestionGroupedTo=" & value
Dim rs As Recordset
Set rs = db.OpenRecordset(sql)
If Not rs.BOF And Not rs.EOF Then
rs.MoveFirst
Do While Not rs.EOF
If retValue <> "" Then retValue = retValue & "~"
retValue = retValue & CStr(rs("QID"))
rs.MoveNext
Loop
End If
Aggregate = retValue
End Function
This is an aggregate function that you create to concatenate the required values.
And then your sql sentence can be like this:
SELECT T.QuestionGroupedTo, Aggregate([QuestionGroupedTo]) AS Expr1
FROM T
GROUP BY T.QuestionGroupedTo, Aggregate([QuestionGroupedTo]);
greetings