Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
一段按钮代码,根据“人事变更”表的内容,在“个人数据”表中填充部门,但是其中一段代码不起作用,不知问题在哪里,请各位老师帮助指教,谢谢!!
'填充部门
For Each dr1 As DataRow In DataTables("个人数据").DataRows
Dim pr1 As DataRow
For j As Byte = 2 To 12
Dim k As Byte = j - 1
If dr1.IsNull("姓名") Then
dr1("部门_" & j) = Nothing
Else
Dim filter As String
filter = "姓名 = '" & dr1("姓名") & "'and 月份 = 'j'"
pr1 = DataTables("人事变更").Find(filter)
If pr1 IsNot Nothing Then
If pr1("部门") ="退休"
dr1("部门_" & j) = Nothing
ElseIf pr1("部门") ="调出"
dr1("部门_" & j) = Nothing
Else
dr1("部门_" & j) = pr1("部门")
End If
Else
dr1("部门_" & j) = dr1("部门_" & k)
End If
End If
Next
Next
要求的效果:
现在的效果:
下载信息 [文件大小: 下载次数: ] | |
![]() |