M
Mike
I get the err.number 486 error message when I try to print within a loop to
my HP LJ 1022. After the first page prints, the other 15 pages all choke on
the err.number 486. According to the VB Help files, there is no such error
message.
I run the same program on my Xp Home edition PC and print to the HP LJ 1022
as a network printer attached to the Vista machine via Netgear switch, and
the same code works perfectly even to the same printer as a network printer.
What am I missing here? My new Dell has 4GB of RAM, as compared to 512 MB
on the old Dell, so memory shouldn't be a problem.
The code that chokes is listed below. The statement it chokes on after
printing the first page is "PrintForm":
PrintAllLines:
Dim ipos, LnNbr
LnNbr = 0: ipos = 0
For MtsPropLocRec = 1 To MtsPropLoctotRecords
Call ReadMtsPropLocFile(SysPth, MtsPropLocFname, MtsPropLocBuf1,
MtsPropLocRec, MtsPropLoctotRecords)
If ChooseRptType Then
GoSub testForMatch
If Match = 0 Then
GoTo NextRec
End If
PrtPage = 1
End If
If (allRecs And dtType > 0) Then
GoSub testForMatch
If Match = 0 Then
GoTo NextRec
End If
PrtPage = 1
End If
GoSub BldPrtLine
LnNbr = LnNbr + 1
ipos = ipos + 20
If LnNbr >= 18 Then
If (Page >= beginPage And Page <= endPage) Then
PrintForm
End If
LnNbr = 1: Page = Page + 1
clrDataElements
ipos = 0
LnNbr = 0
'Printer.EndDoc
End If
NextRec:
Next
If ((Page < 2 And PrtPage And prtRange = 0) Or _
(LnNbr > 1 And PrtPage)) Then
PrintForm
PrtPage = 0
End If
Return
Mike
my HP LJ 1022. After the first page prints, the other 15 pages all choke on
the err.number 486. According to the VB Help files, there is no such error
message.
I run the same program on my Xp Home edition PC and print to the HP LJ 1022
as a network printer attached to the Vista machine via Netgear switch, and
the same code works perfectly even to the same printer as a network printer.
What am I missing here? My new Dell has 4GB of RAM, as compared to 512 MB
on the old Dell, so memory shouldn't be a problem.
The code that chokes is listed below. The statement it chokes on after
printing the first page is "PrintForm":
PrintAllLines:
Dim ipos, LnNbr
LnNbr = 0: ipos = 0
For MtsPropLocRec = 1 To MtsPropLoctotRecords
Call ReadMtsPropLocFile(SysPth, MtsPropLocFname, MtsPropLocBuf1,
MtsPropLocRec, MtsPropLoctotRecords)
If ChooseRptType Then
GoSub testForMatch
If Match = 0 Then
GoTo NextRec
End If
PrtPage = 1
End If
If (allRecs And dtType > 0) Then
GoSub testForMatch
If Match = 0 Then
GoTo NextRec
End If
PrtPage = 1
End If
GoSub BldPrtLine
LnNbr = LnNbr + 1
ipos = ipos + 20
If LnNbr >= 18 Then
If (Page >= beginPage And Page <= endPage) Then
PrintForm
End If
LnNbr = 1: Page = Page + 1
clrDataElements
ipos = 0
LnNbr = 0
'Printer.EndDoc
End If
NextRec:
Next
If ((Page < 2 And PrtPage And prtRange = 0) Or _
(LnNbr > 1 And PrtPage)) Then
PrintForm
PrtPage = 0
End If
Return
Mike