Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    dennisb82 is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Aug 2017
    Posts
    43
    With my current frmMutations I can't notice when a product is sorted at a wrong store. In the attached access-file I want to be able to scan the barcode of a Custstr (see tblStore) and then automatically populate the Customer en Storenr of the FrmMutations for the next productbarcodes, until I scan the next Custstr.



    For example: The barcodes of the product all begin with a number. The Custstr begins with letters. So I begin scanning a Custstr (Example IR1001) then a barcode of a product and automatically it sets the Customer (IR) an Storenr (1001) in the fields next to the barcode. After all product of this store are scanned, I scan the next Custstr (IR1002). And so on. Some customers have 2 and some 3 letters before the storenumber.

    On the frmMutations we already have some coding done for barcode at the AfterUpdate event. Maybe I can detect letters in this even and than store the customer/storenr and put them in the fields when I scan a productbarcodes until I scan a new Custst? With Do While and letters recognizing?

    Is this possible?
    Attached Files Attached Files

  2. #17
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Use code in the Custstr textbox AfterUpdate event to set its Default Value property.
    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. #18
    dennisb82 is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Aug 2017
    Posts
    43
    So I can somehow read this Custstr from a barcode and use the customer and storenr as default values for the next productbarcodes? How exactly?

  4. #19
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    As I said, use the control's AfterUpdate event to set its DefaultValue, at least that is recommended solution for normal data entry. I am not sure scanning will trigger the AfterUpdate. Perhaps if the scanner is set to feed carriage return it would work.

    If the field is text data type:

    Me.controlname.DefaultValue = "'" & Me.controlname & "'"

    If the field is number data type, don't use the apostrophes, if it is a date/time type use #.
    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. #20
    dennisb82 is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Aug 2017
    Posts
    43
    Got it! thanks.
    Last edited by dennisb82; 08-31-2017 at 05:28 AM.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 09-20-2015, 07:24 PM
  2. Replies: 2
    Last Post: 08-18-2015, 06:45 AM
  3. Replies: 2
    Last Post: 01-28-2014, 10:13 PM
  4. Expand Button in Datasheet View Doesn't show related table
    By CementCarver in forum Database Design
    Replies: 5
    Last Post: 07-17-2013, 11:48 AM
  5. Replies: 2
    Last Post: 03-11-2012, 07:35 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