If e.DataRow("已收款") <> Nothing AndAlso e.DataRow("收款日期") <> Nothing e.DataRow.Locked = True Dim bh As String = e.DataRow("编号") Dim dr As DataRow = DataTables("客户数据").find("编号 = '"& bh &"'and 日期 = #" & e.DataRow("服务日期") & "#") If dr IsNot Nothing Then msgbox(123) dr("付款状态") = "已付" dr.save End If End If