Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2012
    Posts
    2

    Unanswered: Bar-code Scanning into Ms-Access 2003 DB

    Hi!

    I have a inventory control ERP software, I attached Tec-Bar-code in Item Setup and then make a sales form to enter the daily sales, now my requirement is to make counter sales through bar-code scanner, i have design this form and it is working fine although one problem is there that when we scan an item from scanner then it create three sames records, it should be 1 record per scan, can any body help me to remove this error, kindly note that i attached table with the form and fields with Text_Box, and I use Bar-code Combo-box, and the list of codes are in the list and i use two VBA event like below:

    Private Sub Barcode_AfterUpdate()

    SalesQty=1
    SalesPrice=250
    SalesAmt=SalesQty*SalesPrice

    Exit Sub


    Barcode_Change()

    DoCmd.GoToRecord , , acNewRec

    End Sub

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    First thing I'd try is taking the code out of the Change event, which fires with every keystroke, and add it to the end of the After Update code.
    Paul

  3. #3
    Join Date
    Oct 2012
    Posts
    2
    You are saying right, although please note that when i will put this in after_update then user will need to press ENTER Key after each scan and my requirement is to automatic record insert on each scan. Please note that when we scan a bar-code then it send a code once like "890001" and change event called one time only, that's why i use change event.

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    I'm not clear what you're saying. The user shouldn't have to hit enter, as the scanner should be sending one, else the after update event wouldn't be firing.
    Paul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •