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 by m_sami9; 12-01-2022 at 12:06 PM.
i would have a blank,unbound cell, scan barcode
a query would lookup that BC then add 1 to the QTY
Code:'lookup vID = Dlookup("[Product]","table","[Product]='" & txtBarcode & "'") & "" if vID = "" then 'not found sSql = "INsert into table (Product, Qty) values ('" & txtBarcode & "',1") else sSql = "update table Set Qty = Qty +1 where [Product] = '" & txtBarcode & "'" endif docmd.runSql sSql
It's working... you're great..
Thank you..
Can I use with two conditions??