多行文本框:当控件被锁定时,下一行撤消! [英] Multiline textbox: next line undone when control is locked!

查看:72
本文介绍了多行文本框:当控件被锁定时,下一行撤消!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天!


我在Access中有一个具有多行文本框的表单(我称之为cAbnormalities)。用户仅通过从组合框中选择选项来填充此文本框。我希望每个选定的选项都在一个单独的行中,我不希望用户能够在不使用组合框的情况下编辑文本框。


这是我的从组合框中进行选择时的代码:

Good day!

I have a form in Access that has a multiple line textbox (I called it cAbnormalities). This text box is populated by the user ONLY through selection of options from combo boxes. I want the selected options to each be in a seperate line, and I don''t want the user to be able to edit the textbox without using the combo boxes.

Here is my code when a selection is made from the combo box:

展开 | 选择 | Wrap | 行号

推荐答案

访问帮助vb常量 ;提供简单的解决方案。将所有代码替换为:
Access Help "vb constants" supplies an easy solution. Replace all your code with:
展开 | 选择 | Wrap | 行号


所有OB说的都是正确的。我的做法略有不同,但并不是因为他不会工作:
All OB says is correct. I''d do it very slightly differently, but not because his wouldn''t work :
展开 | 选择 | Wrap | 行号


像往常一样, NeoPa,高效&很好的代码。比原始代码更多。

我的目的是显示旧代码失败的位置,并提供一个完全解决失败代码尝试的解决方案。由于cBoxText是一个ComboBox,我假设没有null或零长度的行。如果是这样,那应该在其他地方处理。原始帖子没有说明触发代码的内容,也没有说明之前有效/错误检查的内容。

由于这是JohannKotzeVet的第一篇文章,我不知道他的技能水平。我的答复是在原帖上。
As usual, NeoPa, efficient & nice code. Does more than the original code does.
My intent was to show where the old code failed, and offer a solution that did exactly what the failed code attempted. As cBoxText is a ComboBox, I assumed that there were no null or zero-length rows. If so, that should be handled elsewhere. The original post gave no indication as to what had triggered the code, nor what validity/error checking had gone before.
As this is the first post by JohannKotzeVet, I did not know his skill level. My response was at the level of the original post.


这篇关于多行文本框:当控件被锁定时,下一行撤消!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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