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
If Forms("报名审核").Opened AndAlso Forms("报名审核").Controls("TabControl1").SelectedPage.Text = "报名登记表"
If e.DataRow("鉴定等级") = "技师" Then
If e.DataRow("原技术资格等级") = "助理工程师" AndAlso e.DataRow("原等级取得时间") <= Date.Today.Year - 4 Then
e.DataRow("是否合格") = True
Else
e.DataRow("是否合格") = False
If e.DataRow("原技术资格等级") = "工程师"
e.DataRow("是否合格") = True
Else
e.DataRow("是否合格") = False
Dim fdr As DataRow = DataTables("证书编号表").Find("身份证号码 = '" & e.DataRow("身份证号码") & "' And 申报鉴定工种 = '" & e.DataRow("申报鉴定工种") & "' And 证书编号 = '" & e.DataRow("证书编号") & "' And convert(substring(证书编号,1,2),'System.Int32') <= " & Date.Today.Year - 2000 - 5)
If fdr IsNot Nothing Then
e.DataRow("是否合格") = True
Else
e.DataRow("是否合格") = False
End If
End If
End If
End If
End If
以上是我根据您的提示在“报名登记表”的DataColChanged事件里写入的代码,但“是否合格列”没反应,点重置列,只有第1行出现“Flase”,其它的行没动静!
再点重置列就出现下面报错!
.NET Framework 版本:2.0.50727.5485
Foxtable 版本:2014.11.11.1
错误所在事件:表,报名登记表, DataColChanged
详细错误信息:
调用的目标发生了异常。
列“证书编号”不属于表 报名登记表。