Home: Products: IDAutomation's Barcode Tutorial for Microsoft® Access®:

IDAutomation's Barcode Tutorial
for Microsoft® Access

IDAutomation.com provides several products for implementing barcodes in Microsoft Access. Their ActiveX Controls are Microsoft Office plug-ins that are the easiest to use in Microsoft Access. If it is desired to use barcode fonts instead, either start and stop characters will be added or use the Microsoft Office Macros. They also provide bar-code label software that can print pre-designed labels from data in columns of an Access database and Image Generators for pasting static bar-code images into reports.

 Using the Bar Code ActiveX Plug-in:  

The ActiveX Control is the easiest method to implement barcoding in Access®.After purchasing or downloading the plug-in (which is called the ActiveX Control), it may be dragged, dropped and sized on a form such as a report. In a Microsoft Access report in design mode, choose insert - ActiveX control. Select the control that was installed starting with "IDAutomation," and drop it on the form. After this, size the control as necessary. To change the properties of the control such as barcode height and symbology type, right click on the control and choose properties. To bind the control to a data source, enter the table and field or formula in the control source field as in the example above. The table and field MUST be entered as in the example, do not just enter the field. The proper barcode will show up after the report is saved and run. The barcode will be created from the data in the control source field.


When using the ActiveX control, tabs and returns can be encoded by inserting =([TestData.Data] & Chr(9) & [TestData.Zip]) in the control source field where TestData.Data points to the table and field that contains the data to encode first, then Chr(9) will encode the tab and TestData.Zip will be the second field.

 Using Bar Code Fonts in Microsoft Access:  

It should be noted that if not a technical user or programmer, try to use the self-checking barcode fonts instead. Self-checking fonts (such as Code 39 and Codabar) have checking code built-in so that calculation of check characters is not required. Check characters are used in more dense symbologies so the barcode scanner can verify it read the barcode correctly. However, to help technical users integrate barcodes into their applications, IDAutomation provides font automation tools such as the Microsoft Office Macros to automatically format the start, stop and check characters to the barcode fonts. For information on these tools, please review their font automation tools site.

Self-checking fonts are easy to use in Microsoft Access as well as other applications, and may be entered directly from the keyboard. All barcodes require a start and stop character and these must also be included in the barcode. Without the start and stop character in the barcode, the scanner does not know where the barcode starts or ends.

For example, to create a barcode that encodes the data "1234ABCD" with the Code 39 Font, use the following formula =("!" & [Table.Field] & "!") in the control source field where Table.Field points to the table and field that contains the data to encode.


Tabs and returns may be added with Code 39 fonts (in extended39 mode) between fields from a Microsoft Access report by inserting =("!" & [Table.Field] & "!") in the control source field where Table.Field points to the table and field that contains the data to encode. The following Microsoft Access formula places a tab function (in extended39) between fields:  =("!"&[DataField1] & "$I" & [DataField2] & "!")

Below is an example of the above formula in a text field on a report:

Tie two fields together in Access®.

 Tutorial for Using VBA Barcode Macro Functions in Microsoft Access:

IDAutomation's macros will generate check digits, add the start and stop characters and format the return string for one of their barcode fonts. The macros may be easily integrated into an application for automation purposes and do not require programming skills - they are easy enough for intermediate and advanced users of Microsoft Access. The macros consist of a VBA module with many barcode symbology functions. The macros are free to use as long as they are being used with one of IDAutomation's licensed barcode fonts. They are compatible with Microsoft Office 97, 2000, XP and 2003 running on Windows or Macintosh systems. The unique encoding in our fonts and macros allow cross-platform support between Macintosh and Windows systems in most countries. For some double byte language settings such as Chinese, Korean and Japanese languages, the IDAutomation Universal Barcode Font Advantage™ is a better choice when used with the Universal Font VBA functions.


Creating the SSCC18 barcode in Access®After downloading and extracting the files, open the sample Microsoft Access database provided. The sample database contains one table, some sample reports and one module. The module contains the custom VBA code, functions and macros. Please refer to this sample database for assistance creating barcodes.

How to Create a Barcode in a Microsoft Access Report:

  1. If using a proprietary database and not the sample provided, first import the macros into the database as described here.
  2. Open a report in design mode.
  3. Create a text box where the barcode is to appear.
  4. To format the data to the barcode in a text box, enter the formula =function([table.field]) in the Control Source property of the text box. Be sure to enter the table and the field in the Control Source property. If unsure of which function to use, try the Code 128 fonts with the =Code128([table.field]) function. A complete list of available functions is provided here. Below is an example of using the SSCC-18 function in the Control Source property.
     Tie the control source in Access® 2000 to the SSCC-18 barcode field.
  5. Run the report to make sure the data is being pulled from the fields and properly formatted to the barcode font. There should be some strange characters that have been appended to the beginning and ending of the data from the fields - this is normal. In some cases, the data needs to be formatted so much it appears to be scrambled. This is normal for Code 128 and Interleaved 2 of 5 when numbers need to be compressed within the barcode.
  6. Change the font of the formula field to be the appropriate barcode font and set the point size. This is a very important step; without it, no barcodes can be displayed. If unsure of the point size to use, 12 points are recommended for the scanner to read easily.

For information about other methods of barcoding in Microsoft Access, please refer to IDAutomation's Microsoft Access Barcode FAQ and Tutorial.


When using Code 128 or one of the 2D barcode font macros provided with PDF417 Fonts or the DataMatrix Fonts, tabs and returns may be encoded by inserting =Code128([TestData.Data] & Chr(9) & [TestData.NumberData],0) in the control source field where TestData.Data refers to the table and field that contains the data to encode, Chr(9) encodes a tab function and TestData.NumberData is the second field. The following example is from Microsoft Access 2003:

 Linking to Microsoft Access with the Barcode Label Software:

IDAutomation Barcode Label Software is an easy-to-use WYSIWYG bar code label printing software application that prints barcodes, text and graphics on standard laser and inkjet printers, as well as thermal transfer printers.

This software can link to columns in Microsoft Access as a data source for a text or barcode object, which allows printing of labels from data in Microsoft Access.

  1. Choose Tools - Data Sets - Link External Data.
  2. Choose the data type and choose Search to find the file.
  3. After the source path is found, choose the appropriate table if applicable.
  4. Choose Link Data and a portion of the linked data should be visible on the screen.

How to link to an external data source in IDAutomation's Barcode Label Software.

  1. After the data is linked, choose Close.
  2. To link a column of data to a barcode or text object, click the down arrow next to "Value Type" and select "External DataSource", and click on the source column to link the value. The example window will show what is linked.
    How to link to a table with IDAutomation Barcode Label Software
  3. Increment the label number in the design screen to verify the data is linked.
  4. When printing, choose "all rows data source" as the option, but only after printing a single page first to verify the alignment.
  5. When linking to the CSV or Text files, the format should be as follows:
    CSV: "Column1","Column2","Column3"
    TEXT: Column1,Column2,Column3

  • To use fonts other than the self-checking versions, please refer to the tutorials at the Microsoft® Office® Macros site.
  • If there are any questions or assistance needed, please contact IDAutomation.
  • Report Software Piracy! If it is suspected that IDAutomation's products are being used in violation of IDAutomation's license agreement, copyright laws or international treaties, please report it. The reporting person may remain anonymous.

 

To sign up for monthly updates about new products or upgrades, please click here.Copyright © 2000-2006 IDAutomation.com, Inc. IDAutomation and BizFonts are registered trademarks of IDAutomation.com, Inc.. Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. All other trademarks mentioned are the property of their respective owners.

Over 70% of Fortune 100 companies use IDAutomation's products to automate their businesses.