For Each dr As DataRow In DataTables("表A").DataRows If dr("第一列") = e.Form.Controls("ComboBox1").Value And dr("第二列") = e.Form.Controls("ComboBox2").Value Then dr.Locked = True End If Next
3楼
老有所乐 发表于:2009/5/3 21:39:00
谢谢八婺老师,锁定反了,要求锁定表B的当前行,上面代码锁定表A当前行了,我改成表B,却不行。
4楼
shxiaoya 发表于:2009/5/3 21:50:00
Each dr As DataRow In DataTables("表A").DataRows If dr("第一列") = e.Form.Controls("ComboBox1").Value And dr("第二列") = e.Form.Controls("ComboBox2").Value Then CurrentTable.Current.Locked = True End If Next