Hi,

Before I explain my problem I will give a little background on the situation.....

We have a stock database that runs in access 97, we have 4 PC's that print out barcodes to barcode printers that run on COM 1. The 4 PC's where running Win NT 4 and working fine...until we decided to replace the PC's with new Dell's running Win XP. We can't get access to print to the COM port so I have been tasked with writing an active X control in VB that we can place on a form in access that will send the data from access in a string to the control and the control will then print to the barcode printer on COM 1.

I am a beginner at VB with a single VB book (and not a paticuarly good on at that! ) but im having a go

So far this is the code I have for my active x control

Option Explicit
Dim VarPin As String
Dim VarTQ As String
Dim VarBox As String
Dim V*****ch As String
Dim VarFreeText As String

Public Sub Prnt()
Open "COM1" For Output As #1
Print #1, "NTLCODE"
Print #1, VarPin
Print #1, VarTQ
Print #1, VarBox
Print #1, V*****ch
Print #1, VarFreeText
Close #1
End Sub

Public Property Let Pin(PinX As String)
VarPin = PinX
End Property

Public Property Let TQ(TQX As String)
VarTQ = TQX
End Property

Public Property Let Box(BoxX As String)
VarBox = BoxX
End Property

Public Property Let Batch(BatchX As String)
V*****ch = BatchX
End Property

Public Property Let FreeText(FreeTextX As String)
VarFreeText = FreeTextX
End Property

Private Sub UserControl_Initialize()

End Sub
NTLCODE is the BASIC code that the printer uses, VarPin, VarTQ etc are the different parts of the barcode that is printed.

When I run the code it will compile but it wont initialize the printer, I have already written code in VB on a standard exe form that can control the printer but im finding transferring that into active x to be a little difficult..

Anyones help would be very much appreciated

(im not after anyone to write the code for me, just a general idea of the direction I should be taking would be great ! )

Thanks

Ian