1
ห้อง MS Access / : สอบถามเรื่องการยิงสแกนบาร์โค้ดสินค้า
« เมื่อ: 10 เม.ย. 68 , 16:09:42 »สมมติให้ Text Box ที่ใส่ Barcode ชื่อ txtBarcode ให้ใช้ Code นี้ครับได้แล้วครับ ขอบคุณมากนะครับ
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Or KeyCode = vbKeyTab Then
If IsNull(Me.txtBarcode) Or Me.txtBarcode = "" Then
MsgBox "ยิง Barcode ผิดช่อง", vbCritical, "Error"
Me.txtBarcode.SetFocus
End If
End If
End Sub
ลองดูครับว่าใช้ได้ไหม