Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

barcode labels 1

Status
Not open for further replies.
Sep 17, 2001
672
0
0
US
I have a text field named item_id with ex. "SDE23422"
I want to insert a barcode on a label form using item_id.

1.) Where can I find a free font to do this?
2.) What font size would I use on form?
3.) Is there any coding required other than installing the font on the system? Such as adding extra data to string such as error checking digit etc. Sample code.

Thanks and hope this is not too confusing!
 
I don't know of any barcode fonts, but i could be wrong. I think the best way to do this is to draw lines into a picturebox. This website will help you figure out how wide to draw each of the bars.

I used to have a .vbx control to draw bar codes when I used VB3, so i would imagine there is an ocx that does this
 
There are loads of commercial and shareware barcode fonts, plus a few freebies. If you try 'barcode fonts' in Google, you'll get plenty of answers. (I got over 38000 answers).

I've used several in the past. To sort printed font size, you need to do a few different tries with your particular scanner. They all have different optimum font size.

Let me know if this helps
 
Well actually I did have a few code128 type fonts and also found a set of functions to calculate the check digit. Now my problem is that I can't figure out how to do the function to the table field. The text box on the form had a datafield property. If I set it to:
barcode.128a(Item_id) I get an error that the field doesn't exist but if set to just Item_id it works but barcode is not check digited. What I need to be able to do is pass the field to the function and use the results on the form. How is this possible?
 
I'd use Code39 as it can display a full range of alphanumeric characters and doesn't need any checksums calculating - simply append an asterisk to the start and end of your text. You should be able to find a free TTF font from somewhere.

To display the formatted code on your form, write a function that performs the formatting and use it wherever you fill your fields - depends if you are doing it all in code or relying on an ActiveX control to do the work. If you use a control you will not have much control over how you format the data.

e.g.
Code:
txtBarcode.Text = BarcodeFormat(rsData("Barcode").Value)

Public Function BarcodeFormat(Barcode as String) As String
BarcodeFormat = "*" & Barcode & "*"
End Function

I'm not sure why you would want to do this though unless you are doing screen dumps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top