Dim n As WinForm.ComboBox = e.Form.Controls("ComboBox1")
Dim b As WinForm.TextBox = e.Form.Controls("TextBox1")
Dim nt As WinForm.Label = e.Form.Controls("Label1")
Dim nt1 As WinForm.Label = e.Form.Controls("Label2")
If e.keycode = Keys.Enter Then
Dim dr As DataRow
dr = DataTables("门店明细").Find("条形码 = '" & b.value & "' and 门店 = '" & n.value & "' ")
If dr IsNot Nothing Then
dr("tem") = 1
Else
MessageBox.Show("条码不存在或者门店不相符")
End If
e.cancel = True
Select Case str(0)
End Select
b.Value = ""
End If
我在textbox的keydown事件里写这个代码居然还是跳到 MessageBox.Show("条码不存在或者门店不相符") 这行代码去!
但是做了一个button 去掉keycode 的部份代码却能正常判断!看不出来有什么差别啊!