如何将CR / LF添加到表单.value文本框中 [英] How to add CR/LF to a forms .value text box

查看:103
本文介绍了如何将CR / LF添加到表单.value文本框中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将cr / lf字符添加到表单文本框中。我使用了为Rich Text设置的文本和备注字段。我可以将它们添加到字符串中,在消息框中显示字符串 - 但是当我将字符串移动到表单字段时,CR / LF将被删除。我不知道如何克服这一点。这是一段代码:

I am trying to add the cr/lf characters to a form text box. I have used both text and a memo field that is set for Rich Text. I can add them to a string, display the string in a message box - but when I move the string to the forms field the CR/LF are being stripped out. I do not know how to overcome that. Here is a snippet of code:

展开 | 选择 | Wrap | 行号

推荐答案

添加回车符/换行符组合到任何字符串:
To add a Carriage Return/Line Feed combination to any String:
展开 | 选择 | Wrap | 行号


感谢ADezii快速答复。请看第30行。在第46行,数据返回到表单 - 由于某种原因它们被删除。
Thanks ADezii for the quick reply. Please take a look at line 30. At line 46 where the data goes back to the form - they are stripped out for some reason.



感谢ADezii的快速回复。请看第30行。在第46行,数据返回到表单 - 由于某种原因,它们被删除。
Thanks ADezii for the quick reply. Please take a look at line 30. At line 46 where the data goes back to the form - they are stripped out for some reason.



无法想出他们为什么会这样做。您可以使用以下命令代替vbCrLf:

Can''t think of any reason why they would be. Instead of vbCrLf, you can use:

展开 | 选择 | Wrap | 行号


这篇关于如何将CR / LF添加到表单.value文本框中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆