启用和禁用控制在连续的子窗体在Access 2007/2010 [英] Enabling and disabling controls on a Continuous Subform in Access 2007/2010
问题描述
我需要启用或禁用在连续窗体的控制,依赖于另一场。最初的code我写的本能是非常相似,建议<一href="http://www.dbforums.com/microsoft-access/1654808-continuous-form-making-button-visible-invisible.html#post6453487"相对=nofollow>此处的,而只是禁止那些被标记为子控件,它禁用所有的人 - 实际上,它似乎只是为了寻找最后一个记录的值影响所有行。
有没有一种方法可以做到这一点,还是我吠错了?低于code:
如果Me.Record_Type =儿童然后禁用辅助记录
Me.Record_Type.SetFocus
Me.Prospect_Name.Enabled =假
结束如果
理智与工作中的行连续纸的唯一方法是使用<一个href="http://office.microsoft.com/en-us/infopath-help/apply-conditional-formatting-to-a-form-template-HA010024057.aspx">Conditional格式化。应用的任何code指的是活动行,因此它似乎影响所有行。
条件格式,Access 2010中
启用/禁用选择
I need to enable or disable a control on a continuous subform, dependent on another field. The initial code I wrote by instinct was very similar to what is suggested here, but instead of only disabling those controls which are marked as "child", it disables all of them - in effect, it seems only to be looking for the value of the last record and affecting all the rows.
Is there a way this can be achieved, or am I barking up the wrong tree? Code below:
If Me.Record_Type = "Child" Then 'Disable subsidiary records
Me.Record_Type.SetFocus
Me.Prospect_Name.Enabled = False
End If
The only way of sensibly working with rows in a continuous form is with Conditional Formatting. Any code applied refers to the active row, and so it appears to affect all rows.
Conditional Formatting, Access 2010
Enable / Disable is selected
这篇关于启用和禁用控制在连续的子窗体在Access 2007/2010的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!