>>>>>Dear All,
>>>>>I have a HandHeld BarCode reader . it is connected to my computer throgh keyboard port.
>>>>>How i can read data returned from this device?
>>>>>thanks
>>>>
>>>>In your case the barcode reader is a keyboard! Just start to read barcodes!
>>>
>>>i made a form with one textbox on it. when i read barcode it cuse hanging my computer!
>>
>>A barcode reader will as default add a chr(13), which means that if you are in a textbox, the cursor will move to the next taborder object. You may change the behavior of the reader, or "eat" the chr(13) by adding this to your keypress:
>>
if nkeycode=13
>> nodefault
>>endif
>Dear Tore,
>I changed my reader and now all thing is ok.
>I have another question.
>I have a textbox on my form, in this textbox user can enter goods code and take some information about it. when i use from Barcode Reader, because it send a CHR(13) code, i lost the focus from my textbox. if i delete chr(13) as you say, how i can enter the goods code in usual mode( without reader ) ?
>thanks for your help
Don't add the code I showed you to supress the chr(13), instead you can for instance add some code to valid() to get what you want. Remember that your program will see the barcode reader as if it was a keyboard, only it automatically adds chr(13) at the end. And make sure that the textbox can accept enough characters.