如果 TextBox 有 Cond,则 Bug 会重新启用它。格式化?
我想我正在直接查看 Access 2003 的错误。这就是我所做的(我认为):
- 我正在开发一个连续表单(即每页多个记录)。
- 我在“详细信息”部分的背景中有一个未绑定的文本框。在数据属性下,我已启用=否,锁定=是。 (换句话说,我不希望用户选择它。我只希望它作为背景颜色)
- 此文本框还具有一些条件格式来更改该行的背景颜色。 (例如,如果我们有一段时间没有与该客户交谈,则该记录的背景为红色)
- 如果我选择条件格式处于活动状态的记录(即背景为红色),我实际上可以单击此文本框。当然,我无能为力,但这种情况不应该发生,而且肯定会让最终用户感到困惑。
还有其他人看过这个吗?你的解决方法是什么?
I think I'm looking directly at an Access 2003 bug. Here's what I did (I think):
- I'm developing a Continuous Form (i.e. multiple records per page).
- I have an unbound textbox in the background of the Details section. Under Data Properties, I have Enabled=No and Locked=Yes. (In other words, I don't want the user to select it. I only want it for the background color)
- This textbox also has some conditional formatting to change the background color for that row. (e.g. If we haven't spoken to that customer in awhile, the background for that record is red)
- If I choose a record where the conditional formatting is active (i.e. the background is red), I can actually click on this textbox. There's not much that I can do, of course, but this shouldn't happen and surely would be confusing to the end-users.
Has anyone else seen this? What's your workaround?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Enabled
是一个可以通过条件格式控制的属性。默认情况下,当您添加新条件时,Enabled
属性设置为 True。 如果您不希望启用控件,则必须在条件格式规则中显式设置 Enabled = False。该属性可通过条件格式对话框右下角的按钮进行切换。很容易错过(我总是忘记它)。
就我个人而言,我认为该属性应该是三向的:True、False 或 Inherit(以 Inherit 为默认值)。不幸的是,Access 强制您在添加条件格式规则时明确说明并说明该规则是否应使控件启用或禁用。
Enabled
is a property that can be controlled via conditional formatting. By default when you add a new condition, theEnabled
property is set to True. If you don't want your control to be enabled you must explicitly set Enabled = False within the conditional formatting rule.The property is toggled via a button in the lower right corner of the conditional formatting dialog. It's easy to miss (I forget about it all the time).
Personally, I think the property should be three-way: True, False, or Inherit (with Inherit as the default). Unfortunately, Access forces you to be explicit when adding conditional formatting rules and state whether the rule should make the control Enabled or Disabled.
这是我的解决方法(我正在等待其他人是否会提出更好的建议。显然不会。)
Me.Txt_FocusHere.SetFocus
。Txt_FocusHere
。因此,每当用户单击彩色背景时,焦点就会立即转移到这个虚拟文本框,该文本框无法存储任何数据,而且很小,用户看不到闪烁的光标。
Here's my workaround (I was waiting to see if anyone else would suggest something better. Apparently not.)
Me.Txt_FocusHere.SetFocus
.Txt_FocusHere
.So whenever the user clicks on the colored background, the focus is immediately taken to this dummy textbox which can't store any data and is so small that the user doesn't see the blinking cursor.
我成功地使用了以下页面上的方法: http://www.mvps.org/access /forms/frm0047.htm - “以连续形式更改当前记录的背景颜色”
I successfully used the method on the following page: http://www.mvps.org/access/forms/frm0047.htm - "Changing the Background Color of the Current Record in a Continuous Form"