代码改成
If e.NewValue <> e.OldValue AndAlso (e.DataCol.name = "审核") Then Dim fdr As DataRow = DataTables("物资领用权限").find("审批人姓名='" & user.name & "' and 物资领用权限='" & e.DataRow("物资说明") & "'") If fdr Is Nothing Then msgbox("无审批权限!") e.cancel = True End IfEnd If