LPT1 Hangs Code (reposted from ASP)

Results 1 to 2 of 2

Thread: LPT1 Hangs Code (reposted from ASP)

  1. #1
    Join Date
    Dec 1969

    Default LPT1 Hangs Code (reposted from ASP)

    Hi,<BR><BR>(I accidentally and incorrectly posted this in the ASP forumn.)<BR><BR>It may be more of a VB question but here goes:<BR><BR>I have an Access DB that prints barcoded labels to a Zebra printer. The code locks up whenever there is a problem with the printer. <BR><BR>Basically it is a system for recording production and printing pallet labels. Once the order has been selected and quantity entered the data is saved and the print is initiated. The bar coded label template is selected (templates are created using Bartender software and special labels are entered where the data is required to be printed). The code imports the label template as a string read from the text file hunts through the string and replaces the special labels with the appropriate data and then outputs the string to LPT1. <BR>if LPT1 is locked the code just hangs without erroring <BR><BR>If Len(stLbl) &#062; 0 Then <BR> Open "lpt1" For Output As #1 <BR> Print #1, stLbl &#039;hangs on this line<BR> Close #1 <BR>End If <BR><BR>Is there any way to test if LPT1 is available? And if not any way to to clear/reset it?

  2. #2
    Join Date
    Dec 1969

    Default not with that...

    your just sending data to a file (printer)<BR>You need to learn about printing under VB, printer object or API, google is a good start.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts