I've created a function that will loop round records in a recordset and bring me back the data i want to display.

The function is

Public Function LoadHistory(ByRef lngProject As Long) As String

Dim rsHistory As New ADODB.Recordset
'Set rsProject = GetRecordset(strSQL)
Set rsHistory = GetRecordset("select * from t_ProjectHistory where projectid = " & lngProject)
Dim sSql As String
'sSql = "========================" & vbCrLf
With rsHistory
If Not .EOF Then
.MoveFirst
Do Until .EOF
sSql = sSql & "On " & .Fields("HistoryDate") & " " & Trim(.Fields("HistoryUser")) & " wrote : " & vbCrLf & .Fields("Comments") & vbCrLf
sSql = sSql & "=================================================" & vbCrLf
.MoveNext
Loop
End If
End With


LoadHistory = sSql

rsHistory.Close
Set rsHistory = Nothing

End Function

later when i call that funtion I want to display the results in one text box, like this

frm_Main.txtComments = LoadHistory(.Fields("Projectid"))

This works, and does give me the result back, but not the carradge returns and lines feeds, instead of getting back this

On 05/11/2007 debbie.coates wrote :
Comment One
=================================================
On 05/11/2007 debbie.coates wrote :
Comment Two
=================================================

i get this

On 05/11/2007 debbie.coates wrote : ||tHE QUICK BROWN FOX JUMPS OVER THE LAZY DOG||=================================================||On 05/11/2007 debbie.coates wrote :
tHE CAT IN THE HAT

so the text is all on one line. does anyone know why this is?