On the first part of the question, the scanner should be able to be setup to add a “postamble” to the barcode read, in that if the barcode is 123456789, the value returned would be 123456789[CR]. Then, you would check the last character in the text box to see if it is a [CR] and do the search at that point. (All the barcode readers I’ve worked with have had that capability.) This should take care of the second part as you would not be searching the database until the character(s) you had set up as the ending character(s) of the barcode is(are) sent to the textbox by the barcode reader. Remeber, also, to clear the value of the value in the textbox at the end of the search code, so that it can be ready for the next value to be sent from the barcode reader.