Access – Bar Code Generator

Access - Bar Code Generator

After my last article on QR Codes:

I wanted to explore QR Code’s sibling, the Bar Code.

Now, for some bar codes you can install special fonts and simply use that font to display the bar code.  That said, like with the QR Code generator I set out to see what I could do using the WebBrowser control so that I didn’t need to install anything, didn’t need to pay anything and didn’t require any special dependencies to work.

Google eventually led me to really impressive bar code javascript (js) library:

This js library already allows for all the following Bar Code types:

  • CODE128
    • CODE128 (automatic mode switching)
    • CODE128 A/B/C (force mode)
  • EAN
    • EAN-13
    • EAN-8
    • EAN-5
    • EAN-2
    • UPC (A)
    • UPC (E)
  • CODE39
  • ITF
    • ITF
    • ITF-14
  • MSI
    • MSI10
    • MSI11
    • MSI1010
    • MSI1110
  • Pharmacode
  • Codabar

and, much, much more.  Review the GitHub repo to learn more about all of its capabilities.

Thus, with this in hand and my QR Code Generator as a template I was all set!

The Access Bar Code Generator

Within an hour or two I had a functional demo that  illustrates how one can integrate bar code technology within any Access database application.

Access - Bar Code Generator - 02

Access - Bar Code Generator - 01

Like with the QR Code Generator, this actually requires little VBA code to achieve (best of all no APIs whatsoever) and thus works on both 32-bit and 64-bit office installations.

This js library make a lot of settings available to you to control the look of the Bar Code (type of bar code, size, font, colors, …) and as such I designed the application so that all of those are controlled within a table.  So setup the table with the settings you want and after that you never need to worry about it again.

This is simply a proof of concept demo to try and help a few of you out there.  That said, with this in hand, you should now be able to implement Bar Code generation into any Microsoft Access database in 2-5 minutes.  How good is that!

I hope this proves useful to some.

Disclaimer/Notes:

If you do not have Microsoft Access, simply download and install the freely available runtime version (this permits running MS Access databases, but not modifying their design):

Microsoft Access 2010 Runtime
Microsoft Access 2013 Runtime
Microsoft Access 2016 Runtime
Microsoft 365 Access Runtime

All code samples, download samples, links, ... on this site are provided 'AS IS'.

In no event will Devhut.net or CARDA Consultants Inc. be liable to the client/end-user or any third party for any damages, including any lost profits, lost savings or other incidental, consequential or special damages arising out of the operation of or inability to operate the software which CARDA Consultants Inc. has provided, even if CARDA Consultants Inc. has been advised of the possibility of such damages.

Download a Demo Database

Feel free to download a 100% unlocked demo copy by using the link provided below:

Download “Access - Bar Code Generator” MSAccess_BarCodes.zip – Downloaded 7919 times – 141.78 KB

Version History

Version Date Changes
V1.000 2022-09-12 Initial Release

3 responses on “Access – Bar Code Generator

  1. azer

    my skus contains letter and number and dash or “-” … is there a way to generate a bar code with that JS cause for now it understand only numbers ?

    best regards

    1. Daniel Pineault Post author

      Use the configuration table (BarCodeSettings) to change the Format being used. The demo is set to MSI, but if you try CODE128 it will accept such characters. So try different format until you find the one that suits your needs.

  2. Cameron Ditore

    Hi! The template works very well, but I was wondering how I import the barcode side of the template database into my existing Access database. Many thanks!