Results 1 to 4 of 4
  1. #1
    m_sami9 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2022
    Posts
    3

    Increase Product Quantity in Subform after Scan Barcode

    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.



    Click image for larger version. 

Name:	Screenshot 2022-11-30 203613.png 
Views:	21 
Size:	23.5 KB 
ID:	49230
    Attached Files Attached Files
    Last edited by m_sami9; 12-01-2022 at 12:06 PM.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    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

  3. #3
    m_sami9 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2022
    Posts
    3
    It's working... you're great..

    Thank you..

  4. #4
    m_sami9 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2022
    Posts
    3
    Can I use with two conditions??

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Barcode Scan and print
    By joaofigu in forum Access
    Replies: 3
    Last Post: 04-12-2019, 05:52 AM
  2. Barcode Scan
    By harhar0506 in forum Forms
    Replies: 8
    Last Post: 06-29-2017, 01:30 PM
  3. Barcode Scanner Invalid Scan
    By nick243 in forum Access
    Replies: 2
    Last Post: 06-13-2016, 02:09 PM
  4. Barcode Scan input
    By Nem3s1S in forum Database Design
    Replies: 4
    Last Post: 09-26-2009, 09:43 AM
  5. Replies: 1
    Last Post: 12-30-2008, 08:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums