I have a table with a memo field called "DESC". That memo field gets populated from code. My problem is that I have carriage returns in my code that converts to some type of symbol which is displayed in the field of the table. How do I get the data to populate the field with the carriage returns instead of the symbols?
Below is my code where I set up my variable contaning the text that I want to be populated into the field, then run the update query to update that field.
That codes converts the "Chr(13)" to a little square symbol instead of a carriage return.
Below is my code where I set up my variable contaning the text that I want to be populated into the field, then run the update query to update that field.
Code:
Set db = CurrentDb
Set rst = db.OpenRecordset("SELECT tblBackgroundReview.Comments FROM tblContractorDataOnly INNER JOIN tblBackgroundReview ON tblContractorDataOnly.cont_dataId = tblBackgroundReview.Data_ID " _
& "WHERE (((tblBackgroundReview.BI_ID)=" & BIID & "));", dbOpenSnapshot)
If Not IsNull(rst![comments]) Then
extComment = Format(Now(), "mm/dd/yyyy hh:nn") & " - " & CurrentUser() & ": Provisional access was extended to " & ext & " " & totExt & " extension(s)" & Chr(13) & rst![comments]
Else
extComment = Format(Now(), "mm/dd/yyyy hh:nn") & " - " & CurrentUser() & ": Provisional access was extended to " & ext & " " & totExt & " extension(s)"
End If
mySql = "UPDATE tblBackgroundReview SET tblBackgroundReview.comments ='" & extComment & "' , tblBackgroundReview.ExtendTo = #" & ext & "#, tblBackgroundReview.totalExtensions = " & totExt & ", tblBackgroundReview.extGiven = Date(), tblBackgroundReview.LastUpdated = Date(), tblBackgroundReview.LastUpdatedTime = Now(), tblBackgroundReview.LastUpdatedBy = CurrentUser() " _
& "WHERE (((tblBackgroundReview.BI_ID)=" & BIID & "));"
DoCmd.SetWarnings False
DoCmd.RunSQL mySql
DoEvents
Form.Requery
DoEvents
DoCmd.SetWarnings True
That codes converts the "Chr(13)" to a little square symbol instead of a carriage return.