Skip to main content
The following example MS Access function demonstrates how to fill up a picture field (an OLE object field) in an MS Access database table with barcodes. The function reads through the entire table and takes the source text for each barcode from a text field named “BarCodeText” and passes it to B-Coder Pro. Next, it generates the barcode and saves the resulting barcode to disk as a .wmf (Windows MetaFile). Finally it inserts the image into the picture field named “BarCodePicture” in the same record as each “Barcode.txt” field. The function below assumes that a table named “table1” is available that has at least two fields, one being a text field named “BarCodeText” (containing our source barcode text data) and another empty OLE object field named “BarCodePicture” (the destination for all barcode graphics). After you get all your barcodes into your Access table as picture objects, you can print them in reports or however you want. Since this procedure also places the barcodes into the table as Windows MetaFiles instead of as bitmaps so you will get a much higher resolution printout and each graphic will use much less space in your database.
Last modified on November 3, 2026