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!

bar codes/opening an application from vb

Status
Not open for further replies.

drewdaman

Programmer
Aug 5, 2003
302
0
0
CA
Hi there,

I have created an MS Access application.

What i need to do is print bar codes. I have some software which does this. But telling people to open up this software and print 1000 bar codes is not a very elegant solution! :(

Does anyone know how i can open up software from within my vb code?

Also, does anyone know if access will allow me to print bar codes? i looked around but couldn't find anything :(

Thanks a ton people!
 
if you want to print just the numbers use the FileSystemObject to create a text file and fill it with the barcode numbers. you can use access to open a text file (or any other file) by setting a hyperlink on a button. this will automaticly pull up the file in the application windows associates it with.

if you want to print the actual barcode images, it's probably possible, but would require a lot of work to get the bar width and spacing just right with just the built-in lines or maybe by creating bitmaps.

whether there's a convenient way to print all those bar codes from your existing bar-code printing software depends on the software and whether it will let you open/print batches of barcodes or only one at a time. it would also depend on how it opens the barcodes (in a separate process/window, like a databse, generating them at runtime...) and/or whether the application can be opened without calling a specific document through the hyperlink. you might also want to look for a more low-level filesystem scripting kind of solution, which can be accessed with access by adding the microsoft scripting runtime to your references and spending some time playing around with how it works. might also try generating .bat files, which i know work well for many simple batch processes (being batch files).

- may seeds of dreams fall from my hands
and by yours be pressed into the ground
 
If it's of any interest, I have an application for a client which prints consignment notes, each of which displays a consignment number in normal characters and also as a barcode, which can be scanned later to enable high speed batch processing of the consignments after delivery.

All I did was supply a barcode font which acts like any other font. The report that produces the consignment note has two fields which display the consignment number; one is set to Arial and the other to the barcode font. Simple and works perfectly.

It could as easily print sequential barcodes of any size on labels in any format you need - such as product pricing labels.
 
thanks for the help guys! tunsarod, i would love to hear more about this bar code font. can i just download it?
 
yes drew....are you doing this for the postoffice?? its funny i saw your post because today im going to install this for a client so that they can save lots of money on postage..first you have to find out what barcode you are using.. all barcodes are just fonts..so after you figure that out just create a form for your labels...or whatever your printing them on and use your query of course and thats it...saves your company lots of money

Thanks, PAUL

 
Actually, your ability to download fonts will depend upon which type of barcode you are using. There are many quality 3 of 9, postnet, and other types of barcode fonts available for download for free. If you get into UPC or some other specialty barcodes, you may have more trouble finding quality for free.

Also, you may need to do some calculations to complete the barcodes. Some require a check digit which is often not stored as part of the data -- technically should not be anyway, but not a major problem if it is. Either way, if the type of barcode you are using requires one and it's not stored with the data, you will need to calculate it before printing.

Another option would be to use a barcode control. A barcode control will take care of check digits, let you control more options (alphas below the barcode, density, etc) with control properties. If you are installing on multiple machines, also dispenses with the problem of people removing the fonts. (What is this goofy font? I don't need this ##$@%).

Either way, fire up google (or your preferred search engine) and type in 'barcode font' and see what happens. You might also want to include the type of barcode you are using in the search.
 
thanks for all the help everyone!

will try it out at work on monday.
 
Actually the font file I distribute to my clients is one I created myself with Corel Draw. It's a 3 of 9 type and yes the scanner requires a check digit fore and aft to read it back. In the instance of a consignment number being displayed as a barcode on a report, formatted to print consignment notes the Control Source is:

=Chr(42) & [Fieldname] & Chr(42)

Where Fieldname is simply a field carrying a combination of alpha and or numeric characters with no punctuation.

i.e. stick Chr(42) before and after the number to be incorporated into the barcode and set the font for the field to the barcode font.

If you can't find what you want out there in etherland let me know and I'll send you the font file.

With a wordprocessor my client prints up a sheet of characters and phrases as barcodes, these include OK, Yes, No, 1,2,3, etc. So with the hand held scanner in one hand he can leaf through a pile of consignment notes at speed with the other hand and select on-screen options by scanning the appropriate response on the printed sheet which he has pinned up by the monitor. This saves heaps of time having to put the scanner down to use the keyboard or mouse every time he needs to enter a simple value or make a choice.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top