Barcode Fonts, Components, ActiveX and .NET Windows Forms Controls, Java Servlets, 
DLLs and Barcode Scanners.  Click to Verify - This site chose VeriSign SSL for secure e-commerce and confidential communications. Click for a Business Review of, Inc., a Barcode Hardware, Software & Services in Tampa FLView your cart in the IDAutomation Store


Home > Barcode Components > Native Barcode Generator for Microsoft Access > User Manual:

Native Barcode Generator for MS Access

Order Native Barcode Generator for MS Access Download Demo for Native Barcode Generator for MS Access View most recent updates to the Access Native Generator Forum support for Native Barcode Generator for MS Access

Product Overview and Compatibility

The Native Barcode Generator is intended for Microsoft Access Developers that wish to easily integrate barcode capability into their databases and applications without any external dependencies. This product is implemented as a VBA Module .BAS file with complete source code, which allows the developer greater flexibility in implementation and design without any annoying add-in menus or license file requirements. Once installed in a database, no other components or fonts need to be installed to create barcodes; it is the complete barcode generator that stays with the database, even when distributed.

Compatibility and Requirements
Application Compatibility Access 2000 to Access 2016
OS Compatibility Microsoft Windows 95 to Windows 10
Barcode Symbology Compatibility Code 128, Code 39, Code 93, Codabar, GS1-128, Interleaved 2 of 5, MSI, USPS Intelligent Mail (IMb), OneCode Confirm, Postnet, Planet, PDF417, GS1-DataMatrix and DataMatrix ECC200. *
Minimum System Requirements 500 MHZ Processor, 128MB RAM, 5 MB Available hard drive space
Intended Implementer Access Developers; End users and non-developers may wish to use the IDAutomation Barcode ActiveX Controls

* This package does not support UPCA, UPCE, EAN13 or EAN8 barcodes because of the required OCR text characters that must appear below this barcode type. If these barcode symbologies are required, the UPC/EAN Barcode Font Advantage Package is available as a separate purchase.

Barcode Integration Tutorial

Installing the Access Native Barcode Generator is a simple process. If problems are encountered with this tutorial, IDAutomation recommends referring to the sample database included in the package. The demo version of this product may only be used within the sample database provided in the download.

  1. Extract the files from the Access Native Barcode Generator package.
  2. Open the database where the barcode is needed.
  3. Press ALT-F11 to open the Visual Basic Editor. If ALT-F11 does not work, in Access 2000 or 2003 choose Tools - Macro - Visual Basic Editor. For Access 2007 and above, choose Database Tools - Visual Basic.
  4. From the Visual Basic Editor, choose File - Import File and import the appropriate VBA module from the files extracted.
    Embedding the Barcode VBA Module
    Once the files are imported, they become embedded in the database file. VBA modules are not available for importing with the Demo Version; the demo version may only be used with the sample database provided.
    1. To add support for linear barcode types, select the IDAutomation_Native_Barcode_VBA.bas file.
    2. If PDF417 or Data Matrix barcodes are needed, import the appropriate module from the 2D folder.
  5. Choose File - Save and then close the Visual Basic Editor. All functions of the Access Native Barcode Generator are now embedded in the database.
  6. Change the report in Design View. This is accomplished by right-clicking on the report and choosing Design in versions prior to 2007 Access. In versions of Access 2007 and above, go to the Design tab and change the view to Design View.
    Change to Design View
  7. Insert a text box in the details section of the form, and increase the height and width so it will be able to contain the barcode. The text box may be easily added by dragging the field from the Field List in versions of Access prior to 2007. Size the box so it is tall and wide enough to contain the barcode symbol. The height of the barcode is changed by sizing the text box.
    Sizing the text box for the bar code
    In versions of Access 2007 and above, click on the text box icon in the Controls Section on the Design Ribbon.
    Choose TextBox from Controls
    Draw the text box on the details section of the form large enough to contain the barcode symbol.
    Draw text box
    A label on the left side of the text field will be automatically added, as shown in the image above with the Text20 label, but may be removed because it will not be visible when the report runs.
  8. Right-click on the text box and select Properties. Change the Name of the text box to txtIDAutomationBC1 and verify the control source is the field that needs to be encoded in the barcode.
    Change the name of the text box
    Optional: The Control Source may be changed to a formula that appends text to the data or combines multiple fields, for example: ="PREFIX" & [Field1]  or  =[Field1] & [Field2]  or  =[Field1] & "," & [Field2]
  9. Save and run the report. Verify that the data to be encoded in the barcode appears in the text box. If it does not, consult Access Help to determine how to get the correct data in the text box. The result of the Control Source in the text box is what will be encoded in the barcode. In some instances, it may be necessary to specify the table and field in the control source, for example: =([Table1.Field1])
  10. If it is desired to have a text interpretation appear below or above the barcode symbol, copy the text box and paste it in a suitable location on the form. Save and run the report. Verify the data that needs to be encoded appears in both text boxes.
    Creating the barcode text interpretation  Viewing the barcode text interpretation
  11. Reopen the report in Design Mode. Right-click on the detail section of the report, choose Build Event and then choose Code Builder.
    Build Event Code Builder
  12. The Visual Basic Editor will open. The code builder may insert text automatically; remove any text that appears in the editor.
  13.  Copy and paste the following text into the editor so it is the only text appearing:
    Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer) 
    If Len(txtIDAutomationBC1) > 0 Then 
       result = IDAutomation_NatG_C128(txtIDAutomationBC1, Me) 
       result = "" 
    Exit Sub
       End If
    End Sub
  14. If a symbology other than Code 128 is necessary, change the function so that IDAutomation_NatG_C128 is the name of the function used to create the barcode and txtIDAutomationBC1 is the name of the text field that is to be encoded as a barcode.
  15. To create the barcode with default options, skip this step. To modify the parameters of the barcode such as the X dimension in MILS, place a comma after "Me" to view available options. To gain greater control over the size of the barcodes, or to create very small symbols, the DPI must be changed to 600 or greater.
    Viewing parameters of the functions.
  16. Save and run the report to verify barcodes are being properly created. If a scanner is needed to verify barcodes, IDAutomation offers several affordable, easy-to-use scanner kits. If the barcode does not appear, check the security settings, double check all steps of this process and refer to Technical Support. To adjust the width of the barcode symbol, change the MILS setting accordingly. The height of the symbol in linear barcodes is determined by the size of the associated text box.
    Barcode result in the access report

Legal Notice: Reports containing this object may only be distributed outside the licensed organization with the purchase of a Developer License to the Native Barcode Generator.

Creating GS1-128 (UCC/EAN-128) Symbols

  • IDAutomation includes the capability in this product to create barcodes and text for GS1-128 (UCC/EAN128) symbols with the Apply Tilde feature. The following describes the changes in the Code and the Control Source selections of the Barcode Integration Tutorial to implement GS1-128. The GS1-128 symbol is created from 17 digits of numbers in the GS1DataField field.
    • Change the ApplyTilde option in Step 15 to "True." The result line should be similar to the following:
          result = IDAutomation_NatG_C128(txtIDAutomationBC1, Me, 12, True)
    • The Control Source selection in Step 8 must be changed to a formula that properly encodes GS1-128 barcodes, for example:
             ="" & [GS1DataField] & "~m17"
    • The IDAutomation_C128HR function may be utilized as the control source for the text interpretation in Step 10 to place the parenthesis in the correct locations of the text. For example: =IDAutomation_C128HR ("" & [GS1DataField] & "~m17" )

Creating GS1-DataMatrix Symbols

  • The following describes the changes in the Code and the Control Source selections of the Barcode Integration Tutorial to implement GS1-DataMatrix.
    • Change the Encoding Mode and enable ApplyTilde in Step 15. The result line should be similar to the following:
      result = IDAutomation_NatG_DataMatrix(IDAutomationDataMatrix1, Me, 20, 300, 1, 3, -1, 0)
    • The Control Source selection in Step 8 must be changed to a formula that properly encodes the FNC1, for example:
      ="(10)123456789(21)" & [NumberData]

Generating Multiple Barcode Symbols on one Report

  • IDAutomation includes the capability to create multiple barcode symbols in the same report. The following describes the changes in the Code and the Control Source selections of the Barcode Integration Tutorial to allow multiple symbols to be created:
    • Add a text box for each barcode needed in the report, described in Steps 7 through 10.
    • Give each text box a unique name instead of the standard name recommended in Step 8. For example, use txtIDAutomationBC1 for the first barcode and txtIDAutomationBC2 for the second.
    • Add additional result lines for each unique text box name that is to contain a barcode, described in Step 13. For example:
      Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
          result = IDAutomation_NatG_C128(txtIDAutomationBC1, Me)
          result = IDAutomation_NatG_C128(txtIDAutomationBC2, Me)
      End Sub

Functions of the Access Native Barcode Generator

The result line in Step 13 of this tutorial may be altered to produce various different barcode types, which are abbreviated below. For example, to create a Code 39 barcode, the result line on step 13 may look similar to: result = IDAutomation_NatG_C39(txtIDAutomationBC1, Me).

The following functions are available:

Barcode Functions (used in the result line of Step 13)

IDAutomation_NatG_C128 (TextControlName, ReportControlName, Mils, ApplyTilde, DPI, Orientation)
IDAutomation_NatG_C128A(TextControlName, ReportControlName, Mils, DPI, Orientation)
IDAutomation_NatG_C128B(TextControlName, ReportControlName, Mils, DPI, Orientation)
IDAutomation_NatG_C128C(TextControlName, ReportControlName, Mils, DPI, Orientation)
IDAutomation_NatG_C39(TextControlName, ReportControlName, Mils, N_Dimension, IncludeCheckDigit, DPI, Orientation)
IDAutomation_NatG_C93(TextControlName, ReportControlName, Mils, DPI, Orientation)
IDAutomation_NatG_Codabar(TextControlName, ReportControlName, Mils, N_Dimension, StartChar, StopChar, DPI, Orientation)
IDAutomation_NatG_DataMatrix(TextControlName, ReportControlName, Mils, ApplyTilde, EncodingMode, PreferredFormat, DPI, Orientation) *
IDAutomation_NatG_I2of5(TextControlName, ReportControlName, Mils, N_Dimension, IncludeCheckDigit, DPI, Orientation)
IDAutomation_NatG_MSI(TextControlName, ReportControlName, Mils, N_Dimension, IncludeCheckDigit, DPI, Orientation)
IDAutomation_NatG_IntelligentMail(TextControlName, ReportControlName, Mils, DPI, Orientation)
(aka: USPS Intelligent-Mail IMb)
IDAutomation_NatG_PDF417(TextControlName, ReportControlName, Mils, EccLevel, ColumnSpecifyRowSpecify, Truncate, ForceBinary, DPI, Orientation) *
IDAutomation_NatG_Postnet(TextControlName, ReportControlName, Mils, IncludeCheckDigit, DPI, Orientation)
IDAutomation_NatG_Planet(TextControlName, ReportControlName, Mils, IncludeCheckDigit, DPI, Orientation)
* Available only in 2D versions.

Text Functions (used in the text interpretation of Step 10)

IDAutomation_C128HR (DataToEncode, ApplyTilde
This function is used to format text for GS1-128 barcode types.
IDAutomation_SpliceText (DataToEncode, SpacingNumber, ApplyTilde)
This function is used to separate text digits into even segments to ease readability.
This function generates a GS1 MOD10 check digit.

Function Properties Definitions:

  • MILS - The X dimension, which is measured at 1/1000 of an inch, where 12 is the default. This value changes the width of the barcode symbol.
  • DPI - The dots-per-inch the graphic is generated for, where 300 is the default. When using a printer with lower or higher resolution, this value may be modified to produce a more accurate symbol. An accurate symbol can only be created on a 203 DPI printer when this value is set to 203.
  • DataToEncode - This string value represents the data being encoded.
  • N_Dimension - Determines the width of the wide bars, which is a multiple of the X dimension. Valid values are 2 and 3. The default is 2.
  • Orientation - Values of 0, 90 and 270 degrees are supported.
  • ReportControlName - The name of the report where the barcode is to appear. This should normally be set to "Me," which is the current report.
  • TextControlName - The name of the text control as specified in Step 8.
  • IncludeCheckDigit - A Boolean value that specifies whether a check digit should be automatically calculated and included for the DataToEncode.
  • EncodingMode - The encoding mode for the Data Matrix symbology; valid values are 0 for BASE256 (Default), 1 for C40, 2 for TEXT and 3 for ASCII. This value must be set to "3" to encode the FNC1 required for GS1-DataMatrix symbols.
  • PreferredFormat - The preferred format of the generated DataMatrix barcode.
  • ECCLevel - The Reed Solomon error correction level to be used in PDF417.
  • Column and Row Specify - The number of rows and columns may be selected, allowing the symbol to be created in various forms. The PDF417 barcode symbol is limited to 30 columns and 90 rows. Some scanners and decoders cannot dependably read symbols with over 20 columns.
  • Truncate - By selecting this option, the right hand side of the symbol is removed or "truncated." This option should be used primarily in a clean environment, since it is more susceptible to damage.
  • ForceBinary - Forces the PDF417 barcode to be encoded in Binary mode.

Technical Support & Troubleshooting

Forum support for Native Barcode Generator for MS Access
View most recent updates to the Access Native Generator
Common Problems and Solutions:

Barcodes do not Appear in the Report - Change Security Settings:

  • A security setting may be the cause. Security may need to be changed to allow VBA macros to run.
    • To enable macros to run in Access 2000 & 2003: Choose Tools - Macro - Security.
      Change the security level to Medium or Low.
      Close the database and reopen it. Macros should now be enabled.
    • To enable macros to run in Access 2007 and up: Open "Customize Quick Access Toolbar" menu to the right of the office button.
      Select "More Commands."
      Choose the "Trust Center" menu button on sidebar.
      Choose the "Trust Center Settings" button on main pane.
      Choose the "Macro Settings" menu button on sidebar.
      Select the "Enable all macros."
      Choose "OK" to close Trust Center.
      Choose "OK" to close Access Options.
      Close the database and reopen it. Macros should now be enabled.

Barcode is Truncated:

  • Size or move the text box object as described in Step 7 above.

Barcodes do not Scan with Default Settings:

  • Check to make sure that barcode type is enabled in the scanner and that there is sufficient white space surrounding the barcode. Additional solutions for this issue are provided in the Barcode will not scan KB article.

Access Reports run Slow:

  • Encoding a large amount of data with PDF417 or Data Matrix may cause reports to slow down because of the complex calculations that must be performed in VBA code for the generation of these symbols. If this issue is observed, consider decreasing the amount of data being encoded, or implement the IDAutomation Barcode ActiveX Controls, which are compiled in C++ for improved calculation speed.

Scanning Problems with Small Barcode Sizes:

  • Verify a printer of 300 DPI or greater is being used. An X dimension of 12 MILS or greater should be used with low resolution thermal 203 DPI printers. IDAutomation also offers many barcode fonts that print well to low resolution thermal printers. Additionally, verify the scanner being used is able to read small barcodes.

Other Barcode Software Products

IDAutomation offers many other barcode products including:

Additional problems and solutions are provided at IDAutomation barcode font troubleshooting page and by searching resolved public forum threads. Priority phone, email and forum support are provided up to 30 days after purchase. Additional priority phone, email and forum support may be obtained if the Priority Support and Upgrade Subscription is active.

Back to Top

 ©Copyright 2015, All Rights Reserved. Legal Notices.

 Barcode Fonts | Components | Scanners | Support | Contact Us

Training Videos on YouTube  Join us on Google Plus  Join us on LinkedIn  Follow us on Twitter  Like us on Facebook
Over 70% of Fortune 100 companies use IDAutomation's products to automate their businesses.