简体   繁体   English

Access 2007 连续表格 - 仅匹配行可编辑

[英]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.

相关问题 使用 VBA 的 Access 2007 表单中的字段匹配循环 - Field matching loop in Access 2007 form using VBA 关闭Access 2007或2010表单中的第一行突出显示 - Turn off first row highlighting in Access 2007 or 2010 form 使用VBA而不是格式&gt;条件突出显示选项在连续表单上的Access 2007中的单元格格式 - Cell formatting in Access 2007 on a continuous form using VBA rather than the format > conditional highlighting option 隐藏Access 2013连续表单中新行的按钮 - Hide button for new row in Access 2013 continuous form 在Access中以连续形式自定义组合框的行源 - Custom row source for combo box in continuous form in Access 仅以MS Access连续形式显示新记录 - Only display new records in a MS Access continuous form Microsoft Access 2007输入表单 - Microsoft Access 2007 Input Form MS Access 2007,在窗体上创建计算字段,仅在当前窗体上的活动记录中添加数据 - MS Access 2007, creating calculated field on a form, that adds data only from the active record on the current form 在Access 2007/2010中启用和禁用连续子窗体上的控件 - Enabling and disabling controls on a Continuous Subform in Access 2007/2010 使用链接表访问连续表单-如何避免为表单中的每一行击中数据库服务器? - Access Continuous Form with Linked Table - How to Avoid Hitting Database Server for Every Row in Form?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM