Barcode ActiveX integration
Centering and sizing barcodes in a Microsoft Access report
Keep barcodes centered and the right size on a Microsoft Access report when the barcode width changes from record to record.
Most barcode symbols will vary in width depending on the amount of data that you encode in the barcode. If a TAL Barcode ActiveX control is inserted into an Access report and the control is bound to a text field in a data table, the width of the barcode may change for each page of the report if the amount of data to be encoded in the barcode changes from one database record to the next. Access does not provide a way to automatically center a control in the report detail section therefore if the barcode increases or decreases in width from one database record to the next, the left edge of the barcode will remain in the same place on each report page and the barcode will grow or shrink to the right of where the control is originally placed.
The TAL Barcode Control also has an “AutoSize” property that causes the control to automatically resize itself whenever the size of the barcode changes as a result of a change in the amount of data being encoded in a symbol. Access does not honor the control’s AutoSize property correctly when printing a report due to a bug in the Access report tool. The following function solves both of these problems. It should be called in the On_Format event handler for the report section containing the control.
Note: When you insert the TAL Barcode ActiveX control in your report, set the AutoSize property of the control to “Yes”
Last modified on November 3, 2026