[英]Access 2007 continuous form - only matching row editable
Good afternoon,下午好,
I've got a continuous form that displays records for any number of selected employees.我有一个连续的表格,可以显示任意数量的选定员工的记录。 I'd like for only that employee's row (or more specifically a particular text box in their row) be editable and no others.
我只希望该员工的行(或更具体地说,他们行中的特定文本框)是可编辑的,而其他人则不能。
I thought about doing something like this.我想过做这样的事情。
Private Sub Form_Load()
If Me.txtResponse <> [Forms]![Home].txtEmployeeName Then
Me.txtResponse.Locked = True
End If
End Sub
and I get an error that I entered an expression that has no value - and it highlights the me.txtResponse.我得到一个错误,我输入了一个没有值的表达式 - 它突出显示了 me.txtResponse。
I don't know if i'm barking up the wrong tree or if this is even possible in a continuous bound form.我不知道我是否在吠错树,或者这是否可能以连续绑定的形式出现。 Any ideas?
有任何想法吗?
Form_Load is too early for that code. Form_Load 对于该代码来说太早了。 Move it to the Form_Current event and it will run when first opened and again with each record navigation.
将它移动到 Form_Current 事件,它将在第一次打开时运行,并在每次记录导航时再次运行。 You'll want to add
你会想要添加
Else
Me.txtResponse.Locked = False
in their to allow changes when a match is made.在他们进行匹配时允许更改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.