hey everyone.i have a project that requires the use of a barcode scanner then apply it to a vb6 application
i dont know how to do this.
the barcode scanner will read the barcode from the id of an employee.

then after reading it, all the details of that employee will be displayed in different controls (labels, textboxes) from the database
any sample code??

initially, i have a textbox and a command button.when i clicked the command button,
all the details of that employee with the employee number (inputted in the textbox) will
be displayed.

how can i do this using a barcode scanner without clicking the command button??

thanks in advance

im using mysql as my database.thanks. :-)

Recommended Answers

All 6 Replies

Firstly, how will your scanner interact with your pc, via usb cable or rs232 cable?

Secondly, what code do you have so far for loading the controls with data from your mysql database once the id is determined?

I would like an answer to this as well. I have not tried any code as of yet, but this is the direction that I want to take my program.

Member Avatar for gowans07

Exactly what i am doing for a school project. I'm not going to offer any information, would i would recommend getting a usb emulation scanner/reader. Using a textbox and a timer or the textchange function, to query the mysql database and then output the correct records into an appropriate format.

In the form load, set focus to your text box. The data scanned from the scanner appears to your program as if the user has typed it in. It is usually terminated with CR so you can place data in the lost_focus event of the text box to

1. insert the scanned data into the database
2. clear the text box and set focus back to it ready for the next scan

note you will need at least one other object, possibly a button, on the form that is capable of receiving focus for this to work

Thank you...

it's simple as inputting/typing in the textbox..i achieved what i want..:-)

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.