I'm importing data scraped from an old web based database and placing the contents into MS Access. The old database has text fields with crlf's and blank lines but when I write this data into Access it all disappears. If I write the same data to a VB message box the crlf's are maintained so I guess something to do with the Access field (I've tried plain and rich text but no difference):
rsu!comment = (xmlNode.nodeTypedValue) 'Write content to database
MsgBox (xmlNode.nodeTypedValue) 'Debug msgbox
So I went back to basics and simply wrote the following string to the database but still got the same result:
teststr = "This is Line 1" & vbcrlf & "This is Line 2"
rsu!comment = teststr
MsgBox = teststr
So it seems it could be an access field/text box format issue?
Has anyone got any code that successfully writes crlf's to an MS Access long text field formatted as "Rich Text" and displays correctly in a text box?
如上所述,这是通过在“评论”字段上运行以下查询来排序的:
Replace([comment],Chr(13) & Chr(10),"<br>")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.