Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing multiple copy reports

Status
Not open for further replies.

BDOIRON

IS-IT--Management
Jul 9, 2002
2
US
Access 2003. DBA

I am converting our invoicing report from a dot-matrix to a laser form. I am using a 5 part ncr carbonless paper multi color so the driver can get a signature on delivery. The forms come presorted by color. I am using the PRINTOUT action to print 5 copies of each page of the invoice. This works fine. However I would like to print on each different colored copy the description of what it is used for. For instance white copy "Original", Blue "Customer" copy and so forth. The printing works like this. Page 1 Page 1....5 times then Page 2 5 times and so on. Where can I put code to print the different descriptions. The code would have to fire in between the printing of each page COPY not after each page. I tried the OnPrint event of the page footer but that code only ran between each page not each copy. Here is the code I am using.

DoCmd.OpenReport "InvoiceLaser", acViewPreview, , "[Invoice No] = Forms![Invoices]![Invoice No]"
DoCmd.PrintOut , , , , 5, False
DoCmd.Close acReport, "InvoiceLaser"


OnPrint Page footer
-------------------
Private Sub PageFooterSection_Print(Cancel As Integer, PrintCount As Integer)
Dim PgNo As Integer, Reps As Integer, TotPages As Integer

PgNo = 1
Reps = 1
TotPages = Me.Pages

Do While PgNo <= TotPages
Stop
Do While Reps <= 5
Stop
Select Case Reps
Case Is = 1
Reports!InvoiceLaser!InvTo1.Visible = True
Reports!InvoiceLaser!InvTo2.Visible = False
Reports!InvoiceLaser!InvTo3.Visible = False
Reports!InvoiceLaser!InvTo4.Visible = False
Reports!InvoiceLaser!InvTo5.Visible = False
Stop
Case Is = 2
Reports!InvoiceLaser!InvTo1.Visible = False
Reports!InvoiceLaser!InvTo2.Visible = True
Reports!InvoiceLaser!InvTo3.Visible = False
Reports!InvoiceLaser!InvTo4.Visible = False
Reports!InvoiceLaser!InvTo5.Visible = False

Case Is = 3
Reports!InvoiceLaser!InvTo1.Visible = False
Reports!InvoiceLaser!InvTo2.Visible = False
Reports!InvoiceLaser!InvTo3.Visible = True
Reports!InvoiceLaser!InvTo4.Visible = False
Reports!InvoiceLaser!InvTo5.Visible = False

Case Is = 4
Reports!InvoiceLaser!InvTo1.Visible = False
Reports!InvoiceLaser!InvTo2.Visible = False
Reports!InvoiceLaser!InvTo3.Visible = False
Reports!InvoiceLaser!InvTo4.Visible = True
Reports!InvoiceLaser!InvTo5.Visible = False

Case Is = 5
Reports!InvoiceLaser!InvTo1.Visible = False
Reports!InvoiceLaser!InvTo2.Visible = False
Reports!InvoiceLaser!InvTo3.Visible = False
Reports!InvoiceLaser!InvTo4.Visible = False
Reports!InvoiceLaser!InvTo5.Visible = True

End Select
Reps = Reps + 1
Loop
PgNo = PgNo + 1
Loop

End Sub


All help would be appreciated
 
Do the print out one at a time

DoCmd.PrintOut , , , , 1, False
'Run the code here

DoCmd.PrintOut , , , , 1, False
'Run the code here

Mark P.
Providing Low Cost Powerful Point of Sale Solutions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top