Most, if not all, barcode scanners have TWO modes : serial and keyboard emulation.
- serial : even in USB or wireless, they come with a driver that make them seen as a serial device usable with the wlanguage sxxx fonctions
- keyboard emulation : everything scanned comes in as a keyboard entry, in the CURRENT FIELD
so in keyboard mode, you need to make sure that the correct field has the focus when scanning, or add a prefix to the scan so that it GETS the focus before the real data arrives
In serial mode, you can use events to detect a scan and act accordingly.
Both modes have their advantages, and of course the coding logic is quite different.