审核合格表啊,判断列名
If e.DataCol.Name = "鉴定等级" Then
If Forms("资格审核").Opened Then
Forms("资格审核").Controls("总人数").Text = e.DataTable.Compute("count(姓名)",Tables("审核合格表").filter)
Forms("资格审核").Controls("初级工").Text = e.DataTable.Compute("count(姓名)", "鉴定等级 = '初级工' And " & iif(Tables("审核合格表").filter>"",Tables("审核合格表").filter,"1=1"))
Forms("资格审核").Controls("中级工").Text = e.DataTable.Compute("count(姓名)", "鉴定等级 = '中级工' And " & iif(Tables("审核合格表").filter>"",Tables("审核合格表").filter,"1=1"))
Forms("资格审核").Controls("高级工").Text = e.DataTable.Compute("count(姓名)", "鉴定等级 = '高级工' And " & iif(Tables("审核合格表").filter>"",Tables("审核合格表").filter,"1=1"))
Forms("资格审核").Controls("技师").Text = e.DataTable.Compute("count(姓名)", "鉴定等级 = '技师' And " & iif(Tables("审核合格表").filter>"",Tables("审核合格表").filter,"1=1"))
Forms("资格审核").Controls("高级技师").Text = e.DataTable.Compute("count(姓名)", "鉴定等级 = '高级技师' And " & iif(Tables("审核合格表").filter>"",Tables("审核合格表").filter,"1=1"))
Forms("资格审核").Controls("男").Text = e.DataTable.Compute("count(姓名)", "性别 = '男' And " & iif(Tables("审核合格表").filter>"",Tables("审核合格表").filter,"1=1"))
Forms("资格审核").Controls("女").Text = e.DataTable.Compute("count(姓名)", "性别 = '女' And " & iif(Tables("审核合格表").filter>"",Tables("审核合格表").filter,"1=1"))
End If
End If
Select Case e.DataCol.Name
Case "鉴定等级", "申报性质"
If e.DataRow("鉴定等级") = "技师" Then
If e.DataRow("申报性质") = "正常申报" Then
e.DataRow("理论考否") = True
Else
e.DataRow("理论考否") = False
End If
End If
If e.DataRow("鉴定等级") = "高级技师" Then
If e.DataRow("申报性质") = "正常申报" AndAlso e.DataRow("是否合格") = True AndAlso e.DataRow("资格审核") = True Then
e.DataRow("理论考否") = True
e.DataRow("考试性质") = "纸质考试"
Else
e.DataRow("理论考否") = False
End If
End If
End Select
Select Case e.DataCol.Name
Case "申报性质","申报鉴定工种","理论考否","考试性质"
If e.DataRow("鉴定等级") = "技师" Then
If e.DataRow("申报性质") = "正常申报" Then
If e.DataRow("资格审核") = True Then
e.DataRow("理论考否") = True
Dim fdr As DataRow = DataTables("机考工种表").Find("鉴定等级二 = '" & e.DataRow("鉴定等级") & "' And 机考工种 = '" & e.DataRow("申报鉴定工种") & "'")
If fdr IsNot Nothing Then
e.DataRow("考试性质") = "上机考试"
Else
e.DataRow("考试性质") = "纸质考试"
End If
Else
e.DataRow("理论考否") = False
e.DataRow("考试性质") = "纸质考试"
End If
Else
e.DataRow("考试性质") = e.DataRow("申报性质")
End If
End If
End Select