dLSoft                software for barcodes and labelling                     

     HOME    PRODUCTS     DEVELOPERS     DOWNLOADS     SALES     SUPPORT     SERVICES     CONTACT US

Barcodes in Access

Barcodes may easily be placed on Access forms or reports using the Active-X control of Barcodes & Labels for Office or the Active Barcode Component family of products. (Similar functionality is available for developers through the Active Barcode Components or the dBarcode Developer kits)

Barcodes in MS Access

Screenshot - click to enlarge

Microsoft Access is a database that holds data in tables. When the Active Barcode Control is added to an Access Form or Report, the control's Properties list allows the user to select one of the Table fields as a Source of the components data - i.e. the data to appear in the barcode. This approach has the advantage that no space is required in the database to store the barcode images - they are created "on the fly" as needed.

An Active Barcode Control may be placed on an Access form or report by selecting the More Controls icon in the toolbox (which, if not visible, can be displayed by checking the Controls Toolbox member of the View – Toolbars menu), or by choosing Active-X Controls from the Insert menu and choosing Active Barcode Control from the list of controls available. In Access 2007/2010/2013 the Active-X Controls item appears on the Design toolbar.

A default barcode image appears on the report. Right-clicking on the barcode and selecting Properties from the pop-up menu causes the control’s Properties dialog to be displayed.

The Record Source may be selected from a drop-down list in the form or report's properties list, and the barcode's Control Source may be selected from the drop down list in the component's properties list. All other properties (code type, size, font, etc.) can be selected from the other entries in the Access Properties list at design time.

Barcode properties in Access

This allows barcode creation to be fully automatic for every record in a database.

Of course, a barcode image that is the same on every record may also be created - by ensuring that the Control Source entry on the component's properties list is empty, and the required data is entered for the Caption property.

Barcodes & Labels for Office also includes macros that allow barcode images to be saved within a database table. Sample Access databases for Access 2007/2010/2013 are included with the distribution of Barcodes & Labels for Office

Font-based barcodes

While barcode images are the ideal way to produce barcodes on Access forms or reports, font-based barcodes can be useful in some situation - for example, where Word's Mailmerge is to be used to generate documents containing data from an Access database.

Font-based barcodes are barcodes in the form of a sequence of text characters that appear as a barcode when displayed or printed in a suitable barcode font. The Barcodes & Labels for Office product provides macros (including source code) for creating font based barcodes from a field in an Access database, storing the resultant barcode text in another field from where it can be used, either to display or print the barcode, or as the source of the barcode for external use - such as Mailmerge in Word.

A developer can modify the macros to create the barcodes without end-user intervention, but two macros are  provided - one to allow the user to display a dialog box for setting the required barcode properties, and one to create the barcodes for all records in a table.

Most common 1D barcodes (see list), including many popular postal barcodes, can be stored in a database in this way, and as the barcode text is relatively small the impact on the database size is small. It is important to note that the relevant barcode font needs to be present on the computer that displays or prints the barcode.

2D Barcodes in Access

Similar functionality for creating 2D barcodes on Access forms and reports is provided by Barcodes & Labels for Office, which supports picture barcodes for a wide range of barcode types and font-based barcodes for a limited range of types.