Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2010
    Location
    Atlanta, GA
    Posts
    211
    Provided Answers: 1

    Question Unanswered: Auto print after users scans a barcode into a text box?

    I have users that use a usb barcode scanner to scan a work order ID, into a form, and then click print to print a report. Its works fine. But they have to do a lot of these at a time so instead of "scan, click print, scan, click print...", they want to just scan and have it automatically print (then the cursor returns to the text box ready for the next scan).

    Trouble is, i am not sure how to trigger the auto print. I can't use "On Change" action because when the barcode reader scans in the Work order ID, as soon as the first character (of 8) enters the box, it triggers the print. I am thinking to do some check for the value length and only initiate the print when the field reaches all 8 characters, but I cant figure this out with the code.

  2. #2
    Join Date
    Aug 2009
    Location
    Up Nort' Wi
    Posts
    140
    Using your on_Change event scenario:

    If Len(Textbox.Text) = 8 Then

    RunYourPrintRoutine

    End If

    Sam
    Good, fast, cheap...Pick 2.

  3. #3
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    You could also make sure your scanner is sending a tab or carriage return, and use the after update event. That would be more flexible in case the number of characters can change.
    Paul

  4. #4
    Join Date
    Oct 2010
    Location
    Atlanta, GA
    Posts
    211
    Provided Answers: 1
    Quote Originally Posted by pbaldy View Post
    You could also make sure your scanner is sending a tab or carriage return, and use the after update event. That would be more flexible in case the number of characters can change.
    This is a good idea. We are getting new scanners so I will wait to see what their capabilities are.

  5. #5
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    All the ones I've worked with either did that out-of-the-box or could be programmed to do it. Programming is pretty easy, as it should come with a set of barcodes that do that type of thing, so it's a matter of scanning a couple of codes.
    Paul

  6. #6
    Join Date
    Nov 2006
    Posts
    2

    How I recently did it

    FTP First time post

    I had a similar issue

    I used the timer event

    Private Sub Form_Timer()

    BolDirty = Me.Dirty

    If BolDirty Then
    Your code here
    End If

    End Sub

Posting Permissions

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