Native Barcode Generator for Microsoft Access

 
Home Products Demos Support Integration Barcode FAQ Order Now Contact Us

 

Home:  Products:  Microsoft Access Implementation Guide:  Native Barcode for Microsoft Access:

Native Barcode Generator for Microsoft Access
Patent Pending

INDEX:

Product Overview and Compatibility

The Native Barcode Generator is a product intended for Access Developers that wish to easily integrate barcode capability into their databases and applications without any external dependencies. This product is implemented as a single VBA Module with complete source code, which allows the developer much 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. End users and non-developers may wish to use IDAutomation's Barcode ActiveX Controls instead of this product because ActiveX Controls are easier to implement in Access.

Compatibility and Requirements
Application Compatibility Access 2000 to Access 2007 and above
OS Compatibility Microsoft Windows 95 to Windows Vista and above
Symbology Compatibility Code 128, Code 39, Codabar, GS1-128, Interleaved 2 of 5, MSI, Postnet, Planet, OneCode, PDF417 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 IDAutomation's 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 is available as a separate purchase.

Barcode Integration Tutorial

Installing the Native Barcode Generator is a fairly easy 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 Native Barcode Generator package.
  2. Open the database the barcode is needed for.
  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, 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. To add support for all linear barcode types, select the IDAutomation_Native_Barcode_VBA.bas file. VBA modules are not available for importing with the Demo Version; the demo version may only be used with the sample database provided. If PDF417 or Data Matrix barcodes are needed, import the appropriate module from the 2D folder. Once the files are imported, they become embedded in the database file.
    Embedding the Barcode VBA Module
  5. Choose File - Save and then close the Visual Basic Editor. All functions of the Native Barcode Generator are now embedded in the database.
  6. Open the report in Design Mode. This is accomplished by right-clicking on the report and choosing Design.
  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 bar-code. The text box may be easily added by dragging the field from the Field List. The label on the left side of the text field may be removed because it will not be visible when the report runs. 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
  8. Right-click on the text box and choose 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.

    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 the data that needs 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 cases, 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. Re-open the report in Design Mode. Right-click on the detail section of the report and choose Build Event and then choose Code Builder
    Build Event Code Builder
  12. The Visual Basic Editor will appear. Remove any text that appears in the editor.
  13. The code builder may insert text automatically, which should be removed. Copy and paste the following green text into the editor so it is the only text appearing:
    Option Compare Database
    Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
        result = IDAutomation_NatG_C128(txtIDAutomationBC1, Me)
    End Sub
  14. If 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 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: Technology used in this product is Patent Pending. 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 in MSAccess

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.

  1. 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)
  2. The Control Source selection in Step 8 may be changed to a formula that encodes GS1-128 barcodes, for example: ="Ê" & [GS1DataField] & "~m17" 
  3. The IDAutomation_C128HR function may be used 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 Multiple Symbols on the Same Report

IDAutomation includes the capability to create multiple bar-code 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:

  1. Add a text box for each barcode needed in the report, described in Steps 7 through 10.
  2. 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.
  3. 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 Native Barcode Generator

The result line in Step 13 of the tutorial may be changed to create various different barcode types, which are abbreviated below. For example, to create a Code 39 barcode, the result line on step 13 may look like:  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_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_OneCode(TextControlName, ReportControlName, Mils, DPI, Orientation) ** (aka: USPS IntelligentMail)
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)
Text Functions (used in the text interpretation control source of Step 10)
IDAutomation_C128HR (DataToEncode, ApplyTildeThis function is used for format text for GS1-128 barcode types.
IDAutomation_SpliceText (DataToEncode, SpacingNumber, ApplyTilde This function is used separate text digits into even segments to ease readability.
MODU10(DataToEncode) This function generates a GS1 MOD10 check digit.

* Available only in 2D versions.

** The OneCode function also supports USPS IntelligentMail. USPS IntelligentMail and OneCode support require the installation of the IDAutomationNativeFontEncoder.dll file, which may be downloaded from
http://www.idautomation.com/fonts/tools/windows_dll/. The file is free to use, provided You or Your organization has purchased a valid License for the Native Barcode Generator for Access.

Description of the properties of the functions:

Technical Support

Common Problems and Solutions:

Other Barcode Software Products

IDAutomation has many other products to offer for barcoding purposes including:

.

© Copyright 2006-2007 IDAutomation.com, Inc., All Rights Reserved. Legal Notices.

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