TIP: Click on subject to list as thread! ANSI
echo: visual_basic
to: All
from: Randy Day
date: 2004-11-24 21:15:00
subject: Re: Barcode Question

Tom wrote:
> Using VB6, I want to read barcode data into an Access 2000 DB.  What do you 

Serial port or keyboard wedge scanner? The means
of handling them are slightly different.

If it's serial, you'll have to get familiar with
the MSCOMM object.

> get when you read a barcode? Text or numbers.  

ASCII values of characters. You have to convert
them to chars in a string. If you have a wedge,
try this experiment:

Set up a test form; put a text box on it.
set the form's keypreview property = true.

Run, scan a code and see if you get *any* input,
even gibberish. If you do, then you can monitor
the actual input values using the form_keypressed
event:

private sub form1_keypressed(keyascii as integer, etc...)
text1=text1 + " " + val(keyascii)
'text1 = text1 + chr(keyascii)
keyascii=0
end sub

Consult an ASCII chart to see if all your barcode
chars appeared - there *might* be one or two extras!

The first value *might be a 'prefix' character,
rather than an actual digit in the barcode.

The last value *might be a 'postfix' character,
rather than an actual digit in the barcode.

It depends on the brand of scanner...

>How do you define the field 
> were the data would be stored?

Once you get them read in, that's up to you.
I'd recommend string...

> 
> Thanks in advance,
> 
> Tom D. 
> 
>
---
þ RIMEGate(tm)/RGXPost V1.14 at BBSWORLD * Info{at}bbsworld.com

---
 * RIMEGate(tm)V10.2áÿ* RelayNet(tm) NNTP Gateway * MoonDog BBS
 * RgateImp.MoonDog.BBS at 11/24/04 9:15:30 PM
* Origin: MoonDog BBS, Brooklyn,NY, 718 692-2498, 1:278/230 (1:278/230)
SEEN-BY: 633/267 270 5030/786
@PATH: 278/230 10/345 106/1 2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.