i have a problem, tried lot of things, but here is the problem:
i have a form, called invoice. sold items would be inputted by an usb barcode scanner. Scanner works, i got the article number is inputted after hit scanner button.
But when i scan, the focus stays in the same field.
what i want to do is:
when you hit the scan button, it must tab to the next line to input the next product.
It also must check the second input. If the second input is the same as the first input, then the first line amount must
be increased with +1.
example: customer buys 3x cola and 2 fanta. then i will click 3 times to the scanner button and the selected first product line must on amount field 3. and when i scan the fanta, it must see the second different produuct and must automatically jump to the next( second ) line and if i hit button for second time to the fanta, then the amount of the second product line must be set to 2.
I need a workaround that detect automatically if the inputted product by barcodereader is the same? if yes, amount +1 if no automatic jump to second line.
Thats all, i know its not a big deal, but i cannot find.
any direction and or help is more then appreciated.
Thanks to all people in advance for replies...
sample code not working :
after update:
Expand|Select|Wrap|Line Numbers
- If (IsNull([aantall])) Then
- Me![Prijs] = Me![keuzelijst met invoervak39].Column(4)
- Me![OMschrijving] = Me![keuzelijst met invoervak39].Column(2)
- Me![BTW] = Me![keuzelijst met invoervak39].Column(3)
- Me![aantall] = "1"
- [OMschrijving].SetFocus
- [Keuzelijst_met_invoervak39].SetFocus
- ElseIf [Keuzelijst_met_invoervak39] = [Product-id] Then
- Me![Prijs] = Me![keuzelijst met invoervak39].Column(4)
- Me![OMschrijving] = Me![keuzelijst met invoervak39].Column(2)
- Me![BTW] = Me![keuzelijst met invoervak39].Column(3)
- Me![aantall] = ([aantall] + 1)
- [OMschrijving].SetFocus
- [Keuzelijst_met_invoervak39].SetFocus
- ElseIf [Keuzelijst_met_invoervak39] <> [Product-id] Then
- 'DoCmd.GoToControl "Subformulier Bondetail"
- DoCmd.GoToRecord , , acNewRec
- Me![Prijs] = Me![keuzelijst met invoervak39].Column(4)
- Me![OMschrijving] = Me![keuzelijst met invoervak39].Column(2)
- Me![BTW] = Me![keuzelijst met invoervak39].Column(3)
- Me![aantall] = "1"
- [OMschrijving].SetFocus
- [Keuzelijst_met_invoervak39].SetFocus
- End If
- End Sub