Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    payton_fulton is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    May 2012
    Posts
    7

    Need a form to relieve a production log

    Greetings Everyone,



    I need to create a form in access that has a single textbox. When the text box is in focus I need to scan a order # barcode and have it look within a table for that specific barcode # that was scanned and place the current date within a completed field. Any Ideas and Thanks in advance for any responses.

  2. #2
    TG_W is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    Does the scanner send the barcode information to a location in the database?

  3. #3
    payton_fulton is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    May 2012
    Posts
    7
    No. What I just need to have happen is when the barcode is scanned in to the text box, I need the current date entered into a completed field for that matching barcodes line within a specific table. For example if I scan the following barcode: 20076100-000, it looks for that number in a table and places 5/10/12 in the completed column on that orders line. Hope this helps and thanks in advance for any responses.

  4. #4
    TG_W is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    Where does the scanner send the information? Is it to the text box? I am trying to figure out where the scanned information is stored (even if temporarily) to proceed

  5. #5
    payton_fulton is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    May 2012
    Posts
    7
    The scanner hooked up via USB, would send the barcode to the textbox. The goal would be to scan one barcode after the other repeatidly without have to press any buttons.

  6. #6
    TG_W is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    Ok. Try setting the code in the Text Box using the On Change event. Test the code below to see if that will work for you.

    Code:
    Docmd.RunSQL ("UPDATE YourTable " & _
         "SET YourTable.Completed = Date() " & _
         "WHERE YourTable.Barcode = [Forms]![YourFormName]![TextBoxName]"
    Hope that helps.

  7. #7
    payton_fulton is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    May 2012
    Posts
    7
    Below is my current code, Table name is "SOXL", and the barcode field name is "Shoporder", the field completion name is "Tube Done" Form Name is "Form1", and the textbox is Text0, when the barcode is scanned the code pops up with the Private Sub Text0_Change() highlighted in yellow. Any ideas and thanks again for your help



    Private Sub Text0_Change()

    Docmd.RunSQL ("UPDATE SOXL " & _
    "SET SOXL.Tube Done = Date() " & _
    "WHERE SOXL.Shoporder = [Forms]![Form1]![Text0]"

  8. #8
    TG_W is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    Remove the space between Tube and Done in your table and the code. Using spaces and hyphens in field names is bad practice and can lead to many problems. You can delete the space or use an underscore _

  9. #9
    payton_fulton is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    May 2012
    Posts
    7
    I changed my code to the following, I still get the Private Sub Text0_Change() highlighted in yellow

    Private Sub Text0_Change()
    Docmd.RunSQL ("UPDATE SOXL " & _
    "SET SOXL.TubeDone = Date() " & _
    "WHERE SOXL.Shoporder = [Forms]![Form1]![Text0]"
    End Sub

  10. #10
    TG_W is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    I'm sorry. Close the parenthesis - [Text0]")

    That should do it.

  11. #11
    payton_fulton is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    May 2012
    Posts
    7
    I don't get the error now, but the date is not appearing in the table "SOXL", could it be a number formatting issue between the form and the table? If so what format would be correct for a barcode like 200759258-000

    Thanks in advance

  12. #12
    Epidural is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    15
    I believe it would have to be text as it contains the non-numerical "-".

  13. #13
    payton_fulton is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    May 2012
    Posts
    7
    Does the textbox need to be bound to the table?

  14. #14
    TG_W is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    You don't have to bind the table. I am trying to recreate the scenario now.

  15. #15
    TG_W is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    Ok, after playing with the code some, try I got it to work as below. I hope this will do the trick for you. If not, I am testing a few other things, as well.

    Docmd.RunSQL ("UPDATE SOXL " & _
    "SET TubeDone = Date() " & _
    "WHERE Shoporder = [Forms]![Form1]![Text0]")

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

Similar Threads

  1. TAT and Queue Time - Production
    By KrenzyRyan in forum Queries
    Replies: 1
    Last Post: 05-20-2011, 10:57 AM
  2. Hesitation production psychological SQL Blues
    By byterbit in forum Queries
    Replies: 1
    Last Post: 05-11-2011, 02:36 PM
  3. Production and Inventory Problem
    By jmorse in forum Access
    Replies: 2
    Last Post: 02-24-2011, 10:07 AM
  4. Production Tracking
    By old_chopper in forum Access
    Replies: 2
    Last Post: 10-11-2010, 12:12 PM
  5. Production
    By teranet in forum Access
    Replies: 1
    Last Post: 06-07-2008, 06:47 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