Hai Friends !
This is my first thread .I 'm developing a vb 6.0 application with barcode scanning enalbled.It's for Photo labs.I 've a bar code scanner connected via USB.It reads the barcode values .No problem with that.But when ever I scan a barcode,the value is stored in the text box and the application focus jumps to next tabbed control .My question is : How can I prevent this tab action from happening ? I want to store the scanned value in to a particular text box or to a vaiable only .. How can I do this? Please help !

Recommended Answers

All 5 Replies

There must be some code / event that is triggering the focus of the control.

Is there any change event coding on the textbox ?

There must be some code / event that is triggering the focus of the control.

Is there any change event coding on the textbox ?

The barcode scanner inputs the scanned value into the which ever Text box in focus at the moment.My question is ,I want to the scanned value to be stored in the particular text box only,say txtCvrNo
I already have a text box to enter some advance amount in the form.By some mistake if my client scans the barcode value in to this text box the application will consider it as advance amount. I want to avoid that.Is there any way ?

The scanner should have a configuration utility and with this utility you can specify characters appended to the string. In this case, the software is sending a tab character. You should be able to specify no character or another key press like enter if you are wanting to allow multiple entries into a multiline text box...

Good Luck

Hai Friends !
This is my first thread .I 'm developing a vb 6.0 application with barcode scanning enalbled.It's for Photo labs.I 've a bar code scanner connected via USB.It reads the barcode values .No problem with that.But when ever I scan a barcode,the value is stored in the text box and the application focus jumps to next tabbed control .My question is : How can I prevent this tab action from happening ? I want to store the scanned value in to a particular text box or to a vaiable only .. How can I do this? Please help !

Most bar code scanners append a newline character after the bar code data. Modern scanners let you disable this feature. Check your bar code scanner manual for details. The USB bar code scanners at barcodingfonts.com have tbis feature.

The barcode scanner inputs the scanned value into the which ever Text box in focus at the moment.My question is ,I want to the scanned value to be stored in the particular text box only,say txtCvrNo
I already have a text box to enter some advance amount in the form.By some mistake if my client scans the barcode value in to this text box the application will consider it as advance amount. I want to avoid that.Is there any way ?

barcode scanners works like any input device like a key board. it accepts the input in the control having focus only. so you need to scan / use the device while focus on desired control only.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.