none
Attempting to test barcode reader and is not working RRS feed

  • Question

  • Related to my last question, but a little more basic. I have a crude barcode reader connected via USB to my laptop. I created a simple MS Access dB form, including field for Barcode number. I first scanned the reader on a barcode including the number for the item, as 20532. However, when I then pointed the scanner to the barcode number field, nothing happened. I had expected the 20532 to be automatically scanned into that field. I have attached my form. Can anyone help here with what might be the problem? Thanks again.

    L. Staley

    Friday, December 16, 2016 11:17 PM

All replies

  • Well, I would first fire up notepad, or even word, ensure that the word document has the cursor focus, and then scan.

    If the above is not working, then it not going to work for Access.

    Regards,
    Albert D. Kallal (Access MVP)
    Edmonton, Alberta Canada

    Friday, December 16, 2016 11:59 PM
  • As Albert mentioned, you should be able to scan in notepad or word, if it does, then I have setup many customers with barcode capabilities and I would be more than happy to help if you need...

    Claude


    Claude Larocque

    Monday, December 19, 2016 9:54 AM
  • Can anyone help here with what might be the problem? Thanks again.

    Hi Larry,

    If the barcode reader is connected to the computer, and working, then when the "Barcode Number" control has the focus, and you read a barcode, the code should appear in the current control.

    Imb.

    Monday, December 19, 2016 12:59 PM
  • All,

    Barcode reader is now working.  Appears very sensitive however, to angle I shoot at the barcode.  However, number is now being scanned and populates the Barcode Number field.

    Here is my challenge now.  Successfully, scanned for a barcode number 24206911 and can leave quantity at default 1 or change to whatever number.

    However, when I rescan the next number, say 33506102, appears the 24206911 number remains in the barcode number box and 33506102 is appending to it so I  have 2420691133506102.  How, when I next scan the 33506102, can I first insure 24206911 is completely removed, in essence the box defaults back first to null or blank?

    Also, If I change quantity, say for example for 24206911, I change 1 to 5.  Then when I next scan 33506102, I want 1 to appear first.  I have 1 as default but quantity field is not going back to showing that on the rescan.

    Appreciate any simple VBA code I can add to clean this up.

    Thanks in advance.

    L. Staley

    Monday, December 19, 2016 6:25 PM
  • Barcode reader is now working.  Appears very sensitive however, to angle I shoot at the barcode.  However, number is now being scanned and populates the Barcode Number field.

    Here is my challenge now.  Successfully, scanned for a barcode number 24206911 and can leave quantity at default 1 or change to whatever number.

    Hi Larry,

    After reading a barcode, you must hit the "Enter" button or go to another control, to accept that value.

    In the AfterUpdate event of the control you can take several actions:

    - Empty the current control
    - Set the Quantity control to 1 (default)
    - Set focus again on the current control.

    If necessary you can add more actions if necessary.

    Imb.

    Monday, December 19, 2016 7:59 PM
  • Hi Imp,

    I assume you are referring to the "After Update Event" for the Quantity text box?  I already have the default value for Quantity set to 1.  So should not that automatically go back to 1 without my having to do anything else?  Otherwise, you are saying I need some code to still explicitly reset it to 1?  If so, is that done as a new event from the "After Update Event" or as expression builder?  If new event, I would need some idea of what the code would look like?  For example, at this point, I have not even assigned an actual variable name to this quantity field. 

    Thanks again.

    L. Staley

    Monday, December 19, 2016 8:18 PM
  • I assume you are referring to the "After Update Event" for the Quantity text box?  I already have the default value for Quantity set to 1.  So should not that automatically go back to 1 without my having to do anything else?  Otherwise, you are saying I need some code to still explicitly reset it to 1?  If so, is that done as a new event from the "After Update Event" or as expression builder?  If new event, I would need some idea of what the code would look like?  For example, at this point, I have not even assigned an actual variable name to this quantity field. 

    Hi Larry,

    I am referrring to the AfterUpdate event of the "Barcode number" control.

    If the name of the control is "Barcode", then its AfterUpdate event would look like:

    Private Sub Barcode_AfterUpdate()
      'do something with the scanned barcode
      '...
    
      'finally reset
      Me!Barcode = Null
      Me!Quantity = 1
      Me!Barcode.SetFocus
    End Sub

    For 'do something ... you fill in your own lines of code  to handle the new barcode input.

    Imb.

    Edit;

    It can be that you are working in a new record. In that case you have to store the record after reading the barcode and running the subsequent actions.

    Opening a new "new record" will automatically have the resetted values.

    Imb.

    Monday, December 19, 2016 8:42 PM