I have a problem and i found a solution that almost solves it.
I have a table with letter numbers and comments. This code summarizes all comments, but i need to show in report particular letter’s comments in one row. Does anyone know how to help me?
Code:
Public Function GetAcctMgrString() As String
Dim strTemp As String
Dim rs As Recordset
Set rs = CurrentDb.OpenRecordset("tableNameHere", dbOpenSnapshot)
With rs
If .RecordCount > 0 Then
.MoveFirst
Do Until .EOF
strTemp = strTemp & !FieldNameHere & ", "
.MoveNext
Loop
strTemp = Left(strTemp, Len(strTemp) - 2)
GetAcctMgrString = strTemp
.Close
End If
End With
End Function
I have a table with letter numbers and comments. This code summarizes all comments, but i need to show in report particular letter’s comments in one row. Does anyone know how to help me?
Code:
Public Function GetAcctMgrString() As String
Dim strTemp As String
Dim rs As Recordset
Set rs = CurrentDb.OpenRecordset("tableNameHere", dbOpenSnapshot)
With rs
If .RecordCount > 0 Then
.MoveFirst
Do Until .EOF
strTemp = strTemp & !FieldNameHere & ", "
.MoveNext
Loop
strTemp = Left(strTemp, Len(strTemp) - 2)
GetAcctMgrString = strTemp
.Close
End If
End With
End Function