I use the Replace function to replace the CrLf's I have in some text in databases. The fields are all of the 'memo'-type (in Dutch. I don't know if it's the same in english. It's a long text type).
In one case all the vbCrLf's are replaced with <br>'s and in the other case (same code, same database settings) it does not work. Here's the code I use:
sRef = RS_products("referentie_Nr"
If ( sRef <> "" ) Then
sRef = CStr(Replace(sRef, vbCrLf, "<br>"
)
Else sRef = ""
End If
sDescr = RS_products("lange_beschr_" & sLang)
If ( sDescr <> "" ) Then
sDescr = CStr(Replace(sDescr, vbCrLf,"<br>"
)
Else sDescr = ""
End If
What am I doing wrong? The vbCrLf's in the database are made with Ctrl+enter in both cases. The first case works, the second one doesn't. Very weird if you ask me for an opinion...
In one case all the vbCrLf's are replaced with <br>'s and in the other case (same code, same database settings) it does not work. Here's the code I use:
sRef = RS_products("referentie_Nr"
If ( sRef <> "" ) Then
sRef = CStr(Replace(sRef, vbCrLf, "<br>"
Else sRef = ""
End If
sDescr = RS_products("lange_beschr_" & sLang)
If ( sDescr <> "" ) Then
sDescr = CStr(Replace(sDescr, vbCrLf,"<br>"
Else sDescr = ""
End If
What am I doing wrong? The vbCrLf's in the database are made with Ctrl+enter in both cases. The first case works, the second one doesn't. Very weird if you ask me for an opinion...