Error 52 al imprimir mas de diez registros
Publicado por Antonio Hernandez (3 intervenciones) el 12/02/2010 01:49:12
Hola que tal , tengo un problema al realizar una impresion de etiquetas de codigo de barra a una impresora zebra tlp 2844 , funciona bien la rutina hasta el momento de enviar mas de diez registros contenidos en un recordset , la comexion la realizo a travez d ADO Y POSTEO el codigo agradeceria muchisimo me pudieran orientar , el error que me arroja es run-time error 52 Bad File Name
With RsDetalleEmbarque
While Not .EOF
Dim n As Integer
n = FreeFile
Open Printer.Port For Output As n
Print #n, "N"
Print #n, "Q,256,19"
Print #n, "D3"
Print #n, "S2"
Print #n, "R255,0"
Print #n, "A302,228,2,3,1,1,N," & Chr(34) & RsDetalleEmbarque.Fields(9) & Chr(34)
Print #n, "A302,204,2,1,1,3,N," & Chr(34) & RsDetalleEmbarque.Fields(3) & Chr(34)
Print #n, "A302,167,2,3,1,1,N," & Chr(34) & RsDetalleEmbarque.Fields(4) & Chr(34)
Print #n, "A302,143,2,3,1,1,N," & Chr(34) & RsDetalleEmbarque.Fields(5) & Chr(34)
Print #n, "B301,110,2,E30,2,4,79,B," & Chr(34) & RsDetalleEmbarque.Fields(10) & Chr(34)
Print #n, "A90,231,2,1,2,3,N," & Chr(34) & RsDetalleEmbarque.Fields(7) & Chr(34)
Print #n, "A45,78,2,3,1,1,N," & Chr(34) & RsDetalleEmbarque.Fields(2) & Chr(34)
Print #n, "FE"
Print #n, "P" & RsDetalleEmbarque.Fields(8)
Print #n, ""
Print #n, ""
Close #n
.MoveNext
Wend
End With
With RsDetalleEmbarque
While Not .EOF
Dim n As Integer
n = FreeFile
Open Printer.Port For Output As n
Print #n, "N"
Print #n, "Q,256,19"
Print #n, "D3"
Print #n, "S2"
Print #n, "R255,0"
Print #n, "A302,228,2,3,1,1,N," & Chr(34) & RsDetalleEmbarque.Fields(9) & Chr(34)
Print #n, "A302,204,2,1,1,3,N," & Chr(34) & RsDetalleEmbarque.Fields(3) & Chr(34)
Print #n, "A302,167,2,3,1,1,N," & Chr(34) & RsDetalleEmbarque.Fields(4) & Chr(34)
Print #n, "A302,143,2,3,1,1,N," & Chr(34) & RsDetalleEmbarque.Fields(5) & Chr(34)
Print #n, "B301,110,2,E30,2,4,79,B," & Chr(34) & RsDetalleEmbarque.Fields(10) & Chr(34)
Print #n, "A90,231,2,1,2,3,N," & Chr(34) & RsDetalleEmbarque.Fields(7) & Chr(34)
Print #n, "A45,78,2,3,1,1,N," & Chr(34) & RsDetalleEmbarque.Fields(2) & Chr(34)
Print #n, "FE"
Print #n, "P" & RsDetalleEmbarque.Fields(8)
Print #n, ""
Print #n, ""
Close #n
.MoveNext
Wend
End With
Valora esta pregunta


0