I'm using this code provided my another user on experts-exchange.
I awarded points seeing that it works however it was not entirely working just yet, my mistake.
It is concatenating the attributes fiemd however it is concatenating all of them over and over.
What I have is a Prepare_Attributes Table:
I need the data like this:
But its currently coming out like this:
So the code is concatenating but it's concating incorrectly.
Thanks in advance for the help.
P.S. I'd prefer to continue using this concat function as I like the way it allows me to use it in different types of queries, i think I just need help on the SQL Select part.
Public Function fConcatenateRecords(strField As String, strRecordset As String, strFieldSeparator As String) As String
' fContatenateRecords(FieldName to concatenate, Table; Query; or SQL SELECT recordset, Separator character)
' DAO recordset is being used to provide backward compatability with Access 97
' Make sure you enable the DAO reference
On Error Resume Next 'To prevent query from hanging no error trapping involved
'If no records are return, you should look for the problem with your SQL SELECT statement
Dim curDB As DAO.Database
Dim rst As DAO.Recordset
Dim strTemp As String
Set curDB = CurrentDb
Set rst = curDB.OpenRecordset(strRecordset)
If .EOF And .BOF Then
fConcatenateRecords = "" 'no records returned
While Not .EOF
strTemp = strTemp & .Fields(strField) & strFieldSeparator & " "
strTemp = Left(strTemp, Len(strTemp) - (Len(strFieldSeparator) + 1))
fConcatenateRecords = strTemp