[AccessD] How to subtract first digit and last two numbers from a barcode?

Gary Kjos garykjos at hotmail.com
Mon Mar 31 08:25:38 CST 2003


Hi Hector,

Have a look at the Mid function.

Mid(fieldname,starting position,length)

mid(yourfield,2,7) would give you positions 2 through 8 of your 10 character 
scan result field. You can get more involved by also combining Mid with Len 
or InStr functions to make it more flexible, but if your fields are always 
the same length you maybe don't need to.

Good luck,

Gary Kjos
garykjos at hotmail.com





>From: "Canales, Hector" <canalesh at bsci.com>
>Reply-To: accessd at databaseadvisors.com
>To: "'accessd at databaseadvisors.com'" <accessd at databaseadvisors.com>
>Subject: [AccessD] How to subtract first digit and last two numbers from a 
>barcode? Date: Mon, 31 Mar 2003 09:13:42 -0500
>
>   Hi List,
>I need help, I am creating a combo box where the user will scan an employee
>ID and the ID number needs to mach with the employee ID on the 
>tblEmployees.
>The problem is that the barcode it has extra numbers.
>Example:
>%061207502 (This is what scans)
>0612075 (this are the numbers that I need)
>%1008937007 (This is what scans)
>10089370 (this are the numbers that I need)
>%100239505 (This is what scans)
>1002395 (this are the numbers that I need)
>%0601443503 (This is what scans)
>06014435 (this are the numbers that I need)
>
>How can I tell Access to subtract the first digit (%) and the last 2 
>numbers
>(XX), and
>Just match the reaming numbers?
>It is the first time I am working with Access, it could be something simple
>but I'm having a hard time.
>
>Thank you,
>Hector
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com


_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail



More information about the AccessD mailing list