以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  文本框输入自动移动指针  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=184185)

--  作者:朱女士
--  发布时间:2022/11/27 16:15:00
--  文本框输入自动移动指针
老师:您好!
    我的问题与前几天的问题类似,现在还是没有圆满解决。我又改变思路了在窗口中添加了三个文本框控件,用扫码枪依次扫码自动跳转指针,就是扫完“清单条码编码”后,自动跳到“员工代码”的文本框,然后再自动跳转到“工序代码”文本框中。不知道怎么实现,谢谢指教!我的代码:跳到只跳到第三个中。

图片点击可在新窗口打开查看此主题相关图片如下:eb807aca0f3199f0a852c82965b65d1.jpg
图片点击可在新窗口打开查看
 

Dim t As Boolean
Dim b1 As WinForm.TextBox
Dim b2 As WinForm.TextBox
Dim b3 As WinForm.TextBox

Dim pr As DataRow = DataTables("车间扫描表").AddNew()
Dim i As Integer = 1
Dim a As String

\'Dim yn As String
\'\'Do While yn <> \'n\'
e.Form.Controls("textbox1").select()
b1 = e.Form.Controls("TextBox1")
Dim zc1 As String = b1.value

pr("清单条码编码") = zc1

e.Form.Controls("textbox2").select()
b2 = e.Form.Controls("TextBox2")
Dim zc2 As String = b2.value
pr("ygdm") = zc2 

\'If zc2 IsNot Nothing Then
\'e.Form.Controls("textbox3").select()

b3 = e.Form.Controls("TextBox3")
Dim zc3 As String = b3.value

pr("gxdm") = zc3
\'End If


Dim filter As String = "清单条码编码=\'" & zc1 & "\'"

Dim wz As Integer = Tables("ddqdb").FindRow(filter)

If wz >= 0 Then
    Tables("ddqdb").Position = wz
\'Else If wz < 0
\'    MessageBox.Show("查无此单", "提示!")
End If

Dim cb1 As WinForm.textBox = e.Form.Controls("textBox9")

Dim ts As Integer = cb1.value
Dim cb2 As WinForm.textBox = e.Form.Controls("textBox15")
Dim jt As Integer = cb2.value
e.Form.Controls("textBox17").value = ts * jt
pr("确认") = True


--  作者:有点蓝
--  发布时间:2022/11/27 20:30:00
--  
请不要发重复的问题:http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&Id=184184