我有一个产品表,每个产品都有一个序列号。还有另一个标记为SOP的字段。
基本上,当产品销售SOP编号(订单编号)时,将在每个序列号旁边的字段中输入。
在我继续之前,当我说扫描时,这是因为一切都是条形码。
我希望能够创建一个表单,我可以在其中扫描SOP编号,然后将其标记为可以扫描该SOP中所有序列号的位置。
然后,需要使用相关的SOP编号更新每个扫描的序列号。
有什么想法吗?
答案 0 :(得分:1)
您需要采取的步骤
1) Create an Orders table with a field for the SOP number
2) Create an Order Details table with field for the SOP number
3) Create a form with a data source of the Orders table
4) Add a subform to the Orders form relating/linking the two forms on the SOP number
5) On the Orders form, disable "Tab Stop" for all fields except the SOP number field.
6) On the Orders form make sure that the "Enter Key Behavior" for the SOP number field is "Default". If you don't do this, when the SOP number is canned, any subsequent scans will go into the same field.
7) On the Orders form add an "After Update" Event Procedure to
i) Test if a value has been entered in the SOP number field
and if so
ii)Set focus on the SOP number on the Order Detail subform
otherwise set focus to the SOP number field on the Orders form
8) On the Order Details subform, disable "tab Stop" for all fields except the serial number field.
9) On the Order Details subform make sure that the "Enter Key Behavior" for the serial number field is "Default".
10) Make sure the scanner is programmed to emulate an enter key press (CR/LF) after each scan, this is the default for most scanners I believe.
扫描SOP编号后,如果找到条目,焦点将转移到子窗体上的序列号字段,然后您可以开始扫描序列号。
SOP编号字段的示例AfterUpdate事件
Private Sub OrderSopNumber_AfterUpdate()
If Me.OrderSopNumber > "" Then
Me.sfmOrderDetail.Form.OrderDetailSerialNumber.SetFocus
Else
Me.OrderSopNumber.SetFocus
End If
End Sub