Results 1 to 5 of 5
  1. #1
    dennisb82 is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Aug 2017
    Posts
    43

    append a list of barcodes to a table and run VBA code for each of them

    Hi guys,

    I have a program in Access 2016 for barcode scanning and matching.

    We receive files with orders (barcode, product, quantity, shipdate) and make an orders-table of it. Then I have a form/scantable for scanning the barcode and fill some columns with the information of the orders-table. There is VBA code after scanning each barcode to do some checks and to get data from the orders-table. With this form/scantable we can make query’s and reports.



    Now sometimes we don’t receive all orders-files but we receive the physical products with the order information printed on it. At this moment we scan these barcodes Excel and put the products in the right location. After we receive the file(s), we are watching the barcodes in Excel.

    I want to be able to do this in Access. So I think I have to create a separate form/table for scanning these barcodes without the order information. After receiving the order-file I want to process the barcodes of this table to the form/scantable with the VBA code run for each barcode.

    I’m a newbe in VBA. Can someone put me in the right direction?

    Maybe I can just scan them as if there would be data, and afterwards run the VBA-code for this barcodes again someway for these scans.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Scan into the form/scantable to create record then later retrieve that record to update with other data. Is the barcode a product ID or an Order number?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    dennisb82 is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Aug 2017
    Posts
    43
    Hi June7. Thanks for helping me again .

    The barcodes ar unique order numbers.
    It sounds like the perfect solution. But how do I retrieve that record to update with other data?

    At this moment I made a frmScans/tblScans where I put the barcodes.
    Via a VBA Module I read the barcodes from the tblScans and write them with the rest of the barcodes in tblMutations with the code below.

    Function tblScansRead()
    Dim StrSQL As String
    StrSQL = "INSERT INTO tblMutations (barcode)SELECT barcode FROM tblScans;"
    DoCmd.RunSQL (StrSQL)
    End Function

    The barcodes are placed in the tblMutations. But I want to run the VBA code that run for each barcode in the frmMutation (with "After update"-event).
    Is there a way to do this?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    I really don't see the need for an intermediate table.

    A record can be retrieved by entering/selecting order number in a combobox and apply filter to form to display just that record or to 'move' to that record. Use the intrinsic search/filter tools or use code to build a customized search/filter. Example of coding to apply filter in this article http://allenbrowne.com/ser-62.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    dennisb82 is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Aug 2017
    Posts
    43
    Hi June7.

    I use this intermediate table so a user can put in a remark, make changes (not on the real data) and for making reports.

    When a order files is received normally (before the products are received). I can put in the tblOrders and directly scan the barcodes in the tblMutations.
    With an "after update" event the VBA code is run for each code and put in the nessesary order info (from tblOrders) and make some checks.

    Somethimes the files for the orders are late.
    So, I want to make the barcodes scans, store them in a table until I receive the order information.
    After receiving the order information I want to be able to put these barcodes in the tblMutaions and run the VBA script per barcode.

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

Similar Threads

  1. Adding Code 128/39 Barcodes to Access Reports
    By Rawb in forum Code Repository
    Replies: 20
    Last Post: 02-11-2023, 03:54 AM
  2. Replies: 4
    Last Post: 06-09-2016, 06:00 AM
  3. Replies: 11
    Last Post: 03-24-2016, 06:12 PM
  4. Replies: 3
    Last Post: 01-24-2013, 02:38 PM
  5. using list box to append whole table
    By shenix2005 in forum Programming
    Replies: 4
    Last Post: 08-20-2010, 08:49 AM

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