If e.DataCol.Name= "xmname" Then
MessageBox.Show("ccc")
Dim nc As DataRow = DataTables("zzxmb1").find("[xmname]=\'" & e.NewValue & "\'")
If nc IsNot Nothing Then
e.DataRow("xmbh")=nc("id")
e.DataRow("jine") =nc("biaozhun")
e.DataRow("xmlx") =nc("xmlx")
e.DataRow("jgcode")=_UserName
e.DataRow("xueqi")= Tables("xqnf").Rows(0)("xueqi")
e.DataRow("year")= Tables("xqnf").Rows(0)("year")
e.DataRow("addtime")= Date.Now
e.DataRow.SetError("xmname","")
Else
\' MessageBox.Show("不存在此资助项目")
e.DataRow.SetError("xmname","不存在此资助项目!")
e.Cancel = True
Return
End If
End If