This script was written to demonstrate a method only for converting UPC A bar code numbers into a printable format on any laser or ink jet printer. It is written to be used on a button. It is also in a format that will allow for simple modification to convert other types of bar code systems as they are all different. It does not have error checking or any extras. This was to make it easier to understand but it is fully functional and ready to go as long as these directions are followed. The script is meant to be edited by any user to fit his or her needs.
This script assumes that you have a product table called product with two character fields. One named product_id (12 characters) and the other named bar_code (20 characters). I have also attached a font that should be copied to your windows fonts directory. Once you copy it you should open up the directory once and close it. For some reason windows does not seem to recognize until you do. After you have what you need to get started and want to test it out create a form on the product directory and drag an embedded browse onto it. You only need the product_id field and two instances of the bar_codes field in the browse. Set the font properties to one of the bar_code fields to "CIA UPC Truncated". This font should be available in your font selection if it was copied in properly. Set the font size to 20 and drag the vertical size of the browse rows down so they are about an inch. Add a button to the form with this script. The script is written to fetch the first record only and convert it demonstrating the conversion process. You will need to modify the script to fetch though you table and do all of you records at once or which ever ones you want. Open the form and type 12 characters into the product_id field and hit the button. If everything was set up as explained one of your bar_code fields should show the bar code output that we have all been paying too much for and the other should display the actual bar code in its scan form. This will work in reports as well as long as you set the font properties in the report to "CIA UPC Truncated". They will print on any laser or inkjet printer and can be filtered in full-page A5 reports or labels.
Jeff Moses
Interactive Information Systems, Inc.
[email protected] >any comments
This script assumes that you have a product table called product with two character fields. One named product_id (12 characters) and the other named bar_code (20 characters). I have also attached a font that should be copied to your windows fonts directory. Once you copy it you should open up the directory once and close it. For some reason windows does not seem to recognize until you do. After you have what you need to get started and want to test it out create a form on the product directory and drag an embedded browse onto it. You only need the product_id field and two instances of the bar_codes field in the browse. Set the font properties to one of the bar_code fields to "CIA UPC Truncated". This font should be available in your font selection if it was copied in properly. Set the font size to 20 and drag the vertical size of the browse rows down so they are about an inch. Add a button to the form with this script. The script is written to fetch the first record only and convert it demonstrating the conversion process. You will need to modify the script to fetch though you table and do all of you records at once or which ever ones you want. Open the form and type 12 characters into the product_id field and hit the button. If everything was set up as explained one of your bar_code fields should show the bar code output that we have all been paying too much for and the other should display the actual bar code in its scan form. This will work in reports as well as long as you set the font properties in the report to "CIA UPC Truncated". They will print on any laser or inkjet printer and can be filtered in full-page A5 reports or labels.
Jeff Moses
Interactive Information Systems, Inc.
[email protected] >any comments