B
Barry A&P
I am playing with a barcode reader in my database. and from what i can figure
out standard procedure is to set focus to a control then read the scanner.
i am wondering if anybody has any great ideas to have the barcode itself tell
access what to do. here is what i am hoping..
On my report that i use to print barcodes i can concatenate a prefix to each
Barcode type ie; "*LNID" & [locationid] & "*" = Location Barcode, PNID =
PartNumbr, SNID = SerialNumber Ect..
Then with your help of course i would like some code that is somehow linked
to a unbound Control [barcodeScan]
Set the extracted 4 digit prefix from the barcode as CodePrefix
Set remaining digits as CodeNumber
If Code prefix = "SNID" open form "Serialnumbers" find record serialnumber
= Codenumber. (call lookup combos created by the wizard on other forms??)
Else if Codeprefix = "PNID" Open Form "PartNumbers" Find record partnumber =
codenumber.
Else If there is no prefix assume it is a part number and open form part
numbers.. Can i Do this?? because most barcodes from manufactures would not
have my prefix... (worse case is i could have an additional control with a
list of prefixes that would have to be selected prior to scanning a
Non-Prefixed barcode then concatenate the controls prior to running this
code??)
I would only have 4 or 5 prefixes so they may just be referred in code. or
would it not be too complicated to have prefixes in a table with another
field that would open a certain form so the possibility of 20 prefixes could
be "pre Planned"
any help on this code or a complete new direction would be appreciated..
Thanks
Barry
out standard procedure is to set focus to a control then read the scanner.
i am wondering if anybody has any great ideas to have the barcode itself tell
access what to do. here is what i am hoping..
On my report that i use to print barcodes i can concatenate a prefix to each
Barcode type ie; "*LNID" & [locationid] & "*" = Location Barcode, PNID =
PartNumbr, SNID = SerialNumber Ect..
Then with your help of course i would like some code that is somehow linked
to a unbound Control [barcodeScan]
Set the extracted 4 digit prefix from the barcode as CodePrefix
Set remaining digits as CodeNumber
If Code prefix = "SNID" open form "Serialnumbers" find record serialnumber
= Codenumber. (call lookup combos created by the wizard on other forms??)
Else if Codeprefix = "PNID" Open Form "PartNumbers" Find record partnumber =
codenumber.
Else If there is no prefix assume it is a part number and open form part
numbers.. Can i Do this?? because most barcodes from manufactures would not
have my prefix... (worse case is i could have an additional control with a
list of prefixes that would have to be selected prior to scanning a
Non-Prefixed barcode then concatenate the controls prior to running this
code??)
I would only have 4 or 5 prefixes so they may just be referred in code. or
would it not be too complicated to have prefixes in a table with another
field that would open a certain form so the possibility of 20 prefixes could
be "pre Planned"
any help on this code or a complete new direction would be appreciated..
Thanks
Barry