File attched for barcode question in form

hmho

Registered User.
Local time
Yesterday, 17:12
Joined
Apr 7, 2009
Messages
93
I have table that has these fields
[ID],[SalesDate],[ProdNumber],[SerialNumber],[EndingNumber]
Each product has barcode number and there are two kinds of barcode one with 8 (12345678) digits and one with 9 (123456789) digits what I like to do is scan each product by barcode reader which will read the barcode as text and then I like to code as this
8 digit barcde = 12345678 the first three digits are the [ProdNumber] and digit 4 and 5 are [SerialNumber] and the last three as [EndingNumber].
9 digit barcode = 123456789 the first four digits are the [ProdNumber] and digit 5 and 6 are [SerialNumber] and the last three as [EndingNumber].
Also I designed form for data entry which has all the fields in the table and unbound field for barcode reader. I don’t want to store the barcode reader (I’m not sure if I should) but I want to scan each item and then separate the barcode as above. I attached file here.
Thanks
 

Attachments

Create a query and make the 8 and 9 digit barcodes in that by concatenating the fields as required.

There is no need to store the barcode
 
You can do something like this, on the afterupdate field of the barcode, see attached, via VBA. Or you can create fields in a query using the "Right", "Mid","Left" but in this case, via query, you would need to save the barcode..... Maybe :) I'm still thinking about the need to save the field.......
 

Attachments

You can do something like this, on the afterupdate field of the barcode, see attached, via VBA. Or you can create fields in a query using the "Right", "Mid","Left" but in this case, via query, you would need to save the barcode..... Maybe :) I'm still thinking about the need to save the field.......
CUH,

I think I right know I'll store the barcode and I have one more senerio to avoid duplicate on serial number can you tell me how to code for this change.

8 digit barcode 12345678 should be this. 123=[ProductNumber] and 123-45=[SerialNumber] with the - in between ProductNumber and SerialNumberand 678=[EndingNumber]

9 digit barcode 123456789 should be this. 1234=[ProductNumber] and 1234-56=[SerialNumber] with the - in between ProductNumber and SeriaNnumber and 789=[EndingNumber]
Thanks
 

Users who are viewing this thread

Back
Top Bottom