Increase Product Quantity in Subform after Scan Barcode

m_sami9

New member
Local time
Today, 22:27
Joined
Feb 2, 2020
Messages
13
I've built a POS for my shop. I have built a barcode field in form, when I entered a barcode medicine adds in subform, scanning again the barcode a new row increase but I want only Purchase Quantity increase in subform.
 
Last edited:
You have to capture the barcode in a hidden field on the main form and your code needs to decide whether to add a row to the subform or increase the purchase quantity of an existing row. I don't have a scanner so I can't provide any code.
 
what code are you using to populate the record? whatever it is it would need to be modified - presumably to scan existing entries and if already exists, add 1, otherwise add a new record. What that modification is depends on what code you use at the moment
 
Do you just click in the product/productID field and then scan, or do you click a button and then scan?

I use:

bcode = InputBox("Please scan product")

You could then have your if bcode = x then this else that.
 
what if the price is different, how will you add it?
 
no, not possible. what if you purchase productID 1 @ 30.00 with qty=500.
then later you purchase same product @ 28.95 with qty 10, you mean
you will change All the price of productID 1 from 30 to 28.95?
you will incurr loss.
 
what if the price is different, how will you add it?
Why would the price be different for multiples of the same item on the same order? If the item is new, the code wil automatically add the default price but the user can modify it if that is allowed by his business mode.
 

Users who are viewing this thread

Back
Top Bottom