Hi Steve,
I don't know exactly which barcode you are talking about. Is it really a UPC Code 128? I know UPS-, EAN- and Code 128, as well as UPC A (11 digits fix)and UPC E (7 digits fix). Whatsoever...
Code128 is split into three variations: Code128 A, B and C.
Startcode A: chr(192)
Startcode B: chr(193)
Startcode C: chr(194)
Stopsign : chr(200)
HTH
>I am having some trouble getting some very simple Code 128 barcodes to print correctly. It looks like an extraneous character is being added to the front of the barcode image. You can see an example of what I am talking about at:
>
>
http://www.edssolutions.net/barcode.htm>
>Because this extraneous character occurs at the front of the barcode, it leads me to suspect the checksum program I am using (which I copied and pasted from a thread in this forum :-) ).
>
>Here is the code:
>
>
>Parameters l_in
>
>z=104
>
>For q=1 To Len(l_in)
> Y=Asc(Subs(l_in,q,1))-32
> z=z+Y*q
>Endfor
>
>z=Mod(z,103)
>
>Do Case
> Case z=0
> Return Chr(162)+l_in+Chr(174)+Chr(164)
> Case z<94
> Return Chr(162)+l_in+Chr(z+32)+Chr(164)
> Otherwise
> Return Chr(162)+l_in+Chr(z+71)+Chr(164)
>Endcase
>
>
>Is the CHR(162) character that is being appended to the front of the string correct? Could it possibly be my font that is the culprit? I have tried several different Code 128 fonts, but all give the same results.
>
>Anyone have any insight into this behavior?
>
>Thanks.
Best Regards
-Tom
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.
Oh, and BTW: 010101100100011001010000011110000101001001101111011000110110101101110011