Here is some code I found a while back and it works.
Option Compare Database 'Use database order for string comparisons
' version 2.0 (updated for MsAccess 97)
' (c) 1993-1999 James Isle Mercanti, Cocoa Beach, FL 32931 USA
' Permission granted for public use and royalty-free distribution.
' No mention of source or credits is required. All rights reserved.
' TO USE THIS CODE:
' 1 - Create Report with a TextBox control. (example named Barcode)
' Make sure the Visible property is set to "No".
' 2 - Set On-Print property of section to [Event Procedure]
' by clicking on the [...] and selecting "Code Builder"
' 3 - Confirm that the following code matches yours...
' Sub Detail1_Print (Cancel As Integer, PrintCount As Integer)
' Result = MD_Barcode39(Barcode, Me)
' End Sub
' 4 - NOTE: The name of the section is "Detail1" for example only!
' Your section might show a different name. Ditto for "Barcode".
' 5 - NOTE: To use on sub-forms, the Report name should be hard-coded
' into the function. i.e. Rpt = Reports!MainForm!SubForm.Report.
' The easy method is to just avoid using sub-forms and sub-reports.
Function MD_Barcode39(Ctrl As Control, Rpt As Report)
On Error GoTo ErrorTrap_BarCode39
Dim Nbar As Single, Wbar As Single, Qbar As Single, NextBar As Single
Dim CountX As Single, CountY As Single, CountR As Single
Dim Parts As Single, Pix As Single, Color As Long, BarCodePlus As Variant
Dim Stripes As String, BarType As String, Barcode As String
Dim Mx As Single, my As Single, Sx As Single, Sy As Single
Const White = 16777215: Const Black = 0
Const Nratio = 20, Wratio = 55, Qratio = 35
'Get control size and location properties.
Sx = Ctrl.Left: Sy = Ctrl.Top: Mx = Ctrl.Width: my = Ctrl.Height