G
G Lam
Hi, I have a data input form for bar code data entry. The associated table
only have two fields - Bcode and Qty. I wrote two lines of code in
AfterUpdate Event for the Bcode control in input form like this:
Private Sub Bcode_AfterUpdate()
Qyt = 1
DoCmd.GoToRecord , , acNewRec
End Sub
It works fine; whenever the bar code scanner captures a barcode the qty
field change to 1 and go to a new record and wait for the next scan.
However, before long, the table grows very big, because one record for one
scan. How can I just increment the Qty by 1 if the bar code is the same. If
the bar code changes, add a new record and insert the new bar code to the
new record?
Thank you in advance.
Gary
only have two fields - Bcode and Qty. I wrote two lines of code in
AfterUpdate Event for the Bcode control in input form like this:
Private Sub Bcode_AfterUpdate()
Qyt = 1
DoCmd.GoToRecord , , acNewRec
End Sub
It works fine; whenever the bar code scanner captures a barcode the qty
field change to 1 and go to a new record and wait for the next scan.
However, before long, the table grows very big, because one record for one
scan. How can I just increment the Qty by 1 if the bar code is the same. If
the bar code changes, add a new record and insert the new bar code to the
new record?
Thank you in advance.
Gary