Add Barcode to Report - Microsoft Access
QR Code SDK sample in Microsoft Access demonstrating ‘Add Barcode to Report’
Barcode in Report.txt
1. Add reference to "ByteScout QRCode SDK" ActiveX object to your database project (in menu Tools->References).
2. Put Picture object on the Details section of the report.
3. Handle the Format event of the Details section and set barcode image to the Picture control.
Option Compare Database
Dim BarCodeGenerator
Private Sub Report_Open(Cancel As Integer)
' Setup the barcode generator
Set BarCodeGenerator = CreateObject("Bytescout.BarCode.QRCode")
BarCodeGenerator.RegistrationName = "demo"
BarCodeGenerator.RegistrationKey = "demo"
End Sub
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
' Set barcode value
BarCodeGenerator.Value = Me.Field1
' Set generated barcode image to Picture object
Me.BarcodeImage.PictureData = BarCodeGenerator.GetImageBytesPNG()
End Sub
Private Sub Report_Close()
' Cleanup
Set BarCodeGenerator = Nothing
End Sub