Public Function ConcatField(parmID As Long) As String
Dim rs As Recordset
Dim strConcat As String
Set rs = Currentdb.OpenRecordset("Select PersonnelName From TblProject Where ProjectID = " & parmID )
Do Until rs.EOF
strConcat = strConcat & rs!PersonnelName & ", "
Loop
ConcatField = Left(strConcat, Len(strConcat)-2)
End Function
|