I am trying to use the CombineChildRecords Function to concatenate the many results for one row. Unfortunately, the results are truncating after 255 characters. HOw can i get Access to look at this as a LongText/Memo field and stop truncating?
*****************************************************
Function CombineChildRecords(strTblQryIn As String, _
strFieldNameIn As String, strLinkChildFieldNameIn As String, _
varPKVvalue As Variant, Optional strDelimiter) As Variant
Dim db As DAO.Database
Dim qd As DAO.QueryDef
Dim rs As DAO.Recordset
Dim strSQL As String
Dim varResult As Variant
Set db = CurrentDb
Set qd = db.CreateQueryDef("")
If IsMissing(strDelimiter) Then strDelimiter = "; "
strSQL = "SELECT [" & strFieldNameIn & "] FROM [" & strTblQryIn & "]"
qd.SQL = strSQL & " WHERE [" & strLinkChildFieldNameIn & "] = [ParamIn]"
qd.Parameters("ParamIn").Value = varPKVvalue
Set rs = qd.OpenRecordset()
Do Until rs.EOF
varResult = varResult & rs.Fields(strFieldNameIn).Value & strDelimiter
rs.MoveNext
Loop
rs.Close
If Len(varResult) > 0 Then varResult = Left$(varResult, _
Len(varResult) - 1)
CombineChildRecords = varResult
Set rs = Nothing
Set qd = Nothing
Set db = Nothing
End Function