以下是引用nuoyan88在2017/11/30 23:53:00的发言:老师,之前 改过成以下的, 写在了加工工序 这个控件TextChanged的事件。但是一直不能达到3楼说的那种效果,请老师帮忙看看,谢谢
Dim str1 As String = e.form.controls("工序号").text
Dim str2 As String = e.form.controls("毛坯编码").text
If DataTables("工序跟踪表").Compute("Count([_Identify])","毛坯编码 = '" & str2 & "' And 加工工序 = '" & str2 & "'") > 0 Then
MessageBox.Show("已经存在相同工序行!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
无语
Dim str1 As String = e.form.controls("工序号").text
Dim str2 As String = e.form.controls("毛坯编码").text
If DataTables("工序跟踪表").Compute("Count([_Identify])","毛坯编码 = '" & str2 & "' And 加工工序 = '" & str1 & "'") > 0 Then
MessageBox.Show("已经存在相同工序行!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If