Would like to print bar codes

Posted on 2011-09-07
Medium Priority
Last Modified: 2013-02-19

I need to integrate Bar Codes into an application so that I can print our labels and also print bar codes on invoices, packing slips, and other documentation.

My application is currently being run by 15 workstations on our LAN, although all the development is done on my computer.

I think code 128 is what I need because I would like to be able to encode the hyphen (-) character, in addition to normal alphanumeric characters and numbers.

Any suggestions?

My code was developed in Access 2000.
Question by:pcalabria
  • 9
  • 8
  • 2
LVL 21
ID: 36500446
Here is an example I created that  show how to do it.

See: Print Barcodes on an Access report
LVL 21
ID: 36500481
LVL 21
ID: 36500532
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.


Author Comment

ID: 36501872
Thanks, but I am stuck.

I looked at all three links and believe the code128 would be the best fit, if I can get it to work on my system.

Before I start installing stuff on my system I would like to veriify that the jtbarton solution should work with Access 2000.  I am confused however about the references to C# and .net with respect to String Builder.

Also, with respect to downloading the code128 font, I did have some trouble downloading.  The message I received was Data of this type is not supported when I tried to save the Code128.ttf file in my Windows Vista fonts directory.  If I download the font to a folder in MyDocuments then move it to the fonts directory should this work?


Also, I have not been a able to download the code 128 font to my system.
LVL 86

Accepted Solution

Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 total points
ID: 36501897
Be aware that using free barcode fonts can cause troubles with many printers and scanners, depending on how well they're constructed (the fonts, not the machines).

I implemented a solution using a freely available barcode font, and it would work most of the time, but would fail about 20% of the time. Ultimately I ended up buying a commercial barcode font (from idautomation, liked at THTC's last comment) and that solved the issue. If I had to do it over again, I'd use a barcode "generator" like this:



Author Comment

ID: 36501951
UPDATE from above.

I got a little bold and installed the code 128 font on my development computer, which is Windows XP.  The font installed exactly as I would have expected on my XP machine... I guess Vista was doing something I don't understand.

I've also been able to open a word document and select the font, and it works as I would expect.
So it looks like what I need next will be function code that works with Access 2000 to code the checksum and start characters, ie.

I have not done anything with the JTBarton code called string builder, because he say's it works with visual studio 2005 (which I don't have) and .net and he said something I didn't understnad about C#.  What should I do next?


Author Comment

ID: 36504933

Thanks, I looked over the link and yes this does sound like a nice product.  My hesitation to use it, however, it due to the license agreement.  I don't mind paying for good code, but I would hate to introduce software into my product that will stop working if we need to replace a computer or make some other changes.

I would like to give the jtBarton code128 font a try, but I  would need function code to create the proper string as it appears as though the code provided by Barton will not work with Access 2000.

Do you, or anyone here know of any such code?  I'm referring to code that I can use to create a string that will convert the bar code text into text that contains checksum and start characters.

LVL 21
ID: 36504973
You would have to convert teh VB.Net code to VBA code.

I agree with LSMConsulting that you are lot better of purchasing a reliable DLL to do the encoding.

If you are a  very skilled programmer and have lots of time on your hands then you might want to attempt this yourself.  


Author Comment

ID: 36507464
Is anyone able to suggest a product I can purchase which is not likely to shut down the operation if a machine or hard drive needs to be replaced?
LVL 21
ID: 36507948
<<Is anyone able to suggest a product I can purchase which is not likely to shut down the operation if a machine or hard drive needs to be replaced?>>

Maybe I am missing something here. ???

If a hard drive or machine needs replace would cause any and all software to shut down. including Microsoft Office Apps.


Author Comment

ID: 36509671
I made the mistake of using a restricted use add-in once.

We have a network of 15 computers and use Ghost to maintain the network.  When I want to change the software on all 15 workstations, I click a couple of keys on my Ghost console and roll out a new image. Easy.

This $39 add-in that I used had to be installed on every machine which took way too much of my time. Then, two months later, we rolled out a new image to all 15 machines and when we tried to run my Access app, received a message thay a software key could not be found and the software had to be reinstalled.

Even worse, the add in prevented the Access application from working and my company was essentially shut down for a week because every time the app we use to run the business was started we received a license violation message.  I could not be reached as I was on vacation in the Bahamas.  We estimate that the $39 program caused use to loose $30-$50K in sales.

Never again.

If I can't install the software on my model computer, make an image, and roll the image out to my 15 clients, I won't use it.  As I mentioned in a previous post, I don't mind if I have to pay for good code, as long as I can install it on my "model" computer and push the image out to all my computers.  Any code that tries to store special "software key" information on a local hard drive, or depends upon the Internet for verification is going to be a problem.  Some of our machines are restricted and all use Windows Group Policies to prevent unauthorized changes, so this has also caused problems.

So, as you can see, there is great benefit in me being able to incorporate something into my application that is not trying to keep track of who and how it's being used.

LVL 21
ID: 36512742
For your "model" of deployment I would definitely contact the vendor to see if the support your method. Also do lots of testing.

If possible I would look for a DLL that does not require it to be registered. If you look at the barcode example I posted it is actually deploying the font automatically. It even registers the font on load. It is unregistered it on exit. I also use teh same method  to deploy DLLs . I store the DLLs in the front end just like I did the font.  This way I can automatically deploy DLLs.  

Your method of deployment is definitely not the standard way of installing applications.  .I can see how it would cause a lot of issue with some copy protection schemes.

Author Comment

ID: 36516137
Thanks, if anyone has any furthur suggestions I certainly would appreciate them.

The approach that uses the code128 font seems like it may work.  I copies the font into the fonts directory and it seems to print fine.

To use this approach I would only need a function that creates the proper string which includes the characters for start bits, checksum, and the character set.  Its seems like this should be out there, but I haven't been able to find it.

I would also consider a comercial product that I will gladly pay for as long as I can pay for it and use it without limitations.  Any software that tries to keep track of how many machines I am using or hardware details of my machine and turns itself off if it finds something it doesn't like is unacceptable.

If I don't hear back I may post a new question that is more specific.  Thanks in advance.

LVL 86
ID: 36524744
<If I can't install the software on my model computer, make an image, and roll the image out to my 15 clients, I won't use it>

I can't think of many commercial programs like this, since most of them would require your target users to have something installed on them in order to be used. Even a barcode font would be like this - if the machine crashed, and the enduser reinstalled the application, it is entirely possible that Access would refuse to run your application until that barcode font was available. The best way to manage this is to use an "installer" program, that will deploy all needed items to your end users (much like a Windows installation CD would do). If you use this, then you can use whatever 3rd party apps you need, and your users would be able to reinstall as needed, regardless of where you are.
LVL 21
ID: 36525078
<<I would also consider a comercial product that I will gladly pay for as long as I can pay for it and use it without limitations.  Any software that tries to keep track of how many machines I am using or hardware details of my machine and turns itself off if it finds something it doesn't like is unacceptable.>>

I If it were my project I would look into a commercial package.

Again, just ask. The vendor should be able to tell you if your deployment method would cause an issue. They may even assist you in setting up for deployment package.

Words of Wisdom::
If you never ask, the answer is always No.
LVL 21
ID: 36525112
FWIW: I have have used Code 39  ( 3 of 9) for a long time now. I find it best to store as little as possible in the bar code.  That would be just a numeric primary key value. I then look up the rest after scanning.  For me Code 39 works great.

Author Comment

ID: 36527128
Thanks for your comments and advice.  I emailed the company that HiTech told me about last Friday, but haven't heard back yet.

I will keep you advised and award the points to someone once I figure out what I'm doing.

By the way, Code 128 is significantly better for me than Code 39 for many reasons.  The main reason is that our house part numbers are ten characters and I intend to use a three character prefix for verification, so when we consider coding 13 characters, I'm concerned that code 39 would just need too large of a label.

Of course, I could use a smaller code and look up table, but I like the Human Readible benefits that Code 128 offers... just FYI...

LSM, I'm now experimenting with the commercial plug in, and I certainly understand and agree with, your comments as well as HiTechs!

Thanks again
LVL 21
ID: 36531088
<< ...but I like the Human Readible benefits that Code 128 offers ...>
That is easily handled. I just place a control below the control with the bar code to display the text. I even do this with other bar code fonts. It give me a lot more control over placement, size, etc.. I can even print extra text for the humans that the bar code scanner does not need to deal with.

<off topic>
Curious, would you mind sharing what scanner hardware you are using?
</off topic>


Author Comment

ID: 36931908
We have a mixure of scanners that we are trying, from a $20 CCD scanner that we purchased on eBay (Sorry , I don't remember the mfg) to some expensive laser scanners made by Symbol that we purchased about 8 years ago...well, expensive at the time!

I'm also trying the commercial software suggestsed by LSM at this time, and it seems to work well although we still may have some license type issues when we reimage machines.  I'm hoping we can purchase a version that will not have these restrictions.

The only real problem we are having with the tec-it software that we are currenly evaluating is that using code 128 our part number, which is 14 characters which includes dashes and an identification prefix, needs to be printed on a 2 inch label.  I really wish we could have used a 1" or 1.5 inch label.

I don't know if the limitation is with the code we are using, or the printer.  Our printer is the Zerbra TLP-2824 Plus.

I'll check back and award points once we make a decision.  I am starting to understand LSMs comment about ultimately purchasing a commercial product.  Using a barcode font is not as easy as it sounds!

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
A quick solution showing how to control and open a POS Cash Register Drawer using VBA with MS Access.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question