光标位置所在行,是当前用户,下面代码怎么修改呢? 求助
With CurrentTable
Dim r As IntegerDim dr As DataRow
dr = DataTables("员工资料").Find("姓名 = '" &
_UserName & "'") '找出编号为03的产品
If dr IsNot Nothing Then
.Position = r '则选择当前用户的行 e.Form.Controls("有空天数").text = dr("有空天数")
End If
End With
下面这样好像可以了,有问题嘛?
Dim t As Table = Tables("员工资料")
For i As Integer = 0 To t.Rows.Count -1
If t.Rows(i)("姓名") = _UserName Then
t.Position = i
Exit For
End If
Next
[此贴子已经被作者于2018/12/17 19:38:28编辑过]