For Each s As String In e.form.controls("出差人姓名").text.split(",")
If DataTables("差旅费统计表").find("\',\'+出差人姓名+\',\' like \'," & s & ",\' and 返回日期 >#" & e.form.controls("出发日期").value & "# and 出发日期 <#" & e.form.controls("返回日期").value & "#") IsNot Nothing Then
If MessageBox.Show("有出差人员与以前记录重复","提示",MessageBoxButtons.OK,MessageBoxIcon.Error)=DialogResult.OK Then
Tables("差旅费统计表").current("出差人姓名") = Nothing
Tables("差旅费统计表").current("出差人数") = Nothing
End If
ElseIf DataTables("差旅费统计表").find("\',\'+出差人姓名+\',\' like \'," & s & ",\' and 返回日期 =#" & e.form.controls("出发日期").value & "#") IsNot Nothing Then
If MessageBox.Show("有出差人员同日一返一出,请核减出差补助","提示",MessageBoxButtons.OK,MessageBoxIcon.Error)=DialogResult.OK Then
End If
ElseIf DataTables("差旅费统计表").find("\',\'+出差人姓名+\',\' like \'," & s & ",\' and 出发日期 =#" & e.form.controls("返回日期").value & "#") IsNot Nothing Then
If MessageBox.Show("有出差人员同日一返一出,请核减出差补助","提示",MessageBoxButtons.OK,MessageBoxIcon.Error)=DialogResult.OK Then
End If
End If
Next