Dim pd As DataRow Dim txt As String = Forms("盘点核销").Controls("TextBox1").Value pd = DataTables("盘点单据").SQLFind("[盘点单号] = '" & txt & "'") '找出本次盘点单据的盘点数据 If pd IsNot Nothing Then '如果本盘点号盘点单据有数据 Dim syms = DataTables("盘点单据").SQLGetComboListString("溯源码", "[盘点单号] = '" & txt & "'").replace("|", "','") DataTables("溯源码").SQLReplaceFor("是否可用", 0,"当前所在部门 = '" & pd("盘点部门") & "' And 子溯源码 not in ('" & syms & "')") MessageBox.Show("核销成功!", "提示") Else MessageBox.Show("核销时输入框单号保证存在且正确!", "提示") End If
|