I'm trying to print 2 different reports on a printer, but i want them to
print back to back, so is there a way to put it in Visual Basic.
Here's the code I actually have that print the 2 report on two pages.
By the way, my printer is an HP 8150 with a duplex unit...
Set ListeOF = New ADODB.Recordset
Dim Cpt As Integer
Cpt = 1
ListeOF.CursorLocation = adUseClient
ListeOF.Open "Select CLE_SCG From SCG_v_OrdreFabrication",
CurrentProject.Connection, adOpenKeyset, adLockOptimistic
While Not ListeOF.EOF
DoCmd.SelectObject acReport, "OrdreFabrication Page1", True
DoCmd.PrintOut , Cpt, Cpt, , 1
DoCmd.SelectObject acReport, "OrdreFabrication Page2", True
DoCmd.PrintOut , Cpt, Cpt, , 1
Cpt = Cpt + 1
ListeOF.MoveNext
Wend
ListeOF.MoveFirst
While Not ListeOF.EOF
DoCmd.RunSQL ("UPDATE dbo_Cmd set Print_Flag = 1 where CLE_SCG = "
& ListeOF("CLE_SCG"))
ListeOF.MoveNext
Wend
ListeOF.Close
Thanks