Print more than 1 copy

SteveE

Registered User.
Local time
Today, 22:46
Joined
Dec 6, 2002
Messages
221
Is there an option to select how many prints will be printed from theaccess options I would like be to print 2 or 3 etc copies, I can do this through the print dialouge but can I select this option anywhere in the access options?


Steve
 
use the PrintOut method
first open the report in preview mode
call the printout method
and then close it

DoCmd.OpenReport "My Report", acViewPreview, , , acWindowNormal
DoCmd.PrintOut acPrintAll, , , , NumberOfCopies
DoCmd.Close acReport, "My Report"

replace NumberOfCopies with some variable or some constant that represents the number of copies.
 
ptint out

Thanks, I have amended the sample as below but where do I use this? you'll have to excuse me as I can work around the basic OK but I not sure just where to put this.

DoCmd.OpenReport "Planning Report", acViewPreview, , , acWindowNormal
DoCmd.PrintOut acPrintAll, , , , 2
DoCmd.Close acReport, "Planning Report"

thanks again

steve
 
Steve,

You can use this code ie in the Click-event of a commandbutton on your form
 
Thanks but when I use this I am getting an error "wrong number of arguments or invalid property assiognments"

any ideas?

Stev
 
Private Sub Command12_Click()
On Error GoTo Err_Command12_Click

Dim stDocName As String
stDocName = "PlanningReport"
DoCmd.OpenReport "Planning Report", acViewPreview, , , acWindowNormal
DoCmd.PrintOut acPrintAll, , , , 2

Exit_Command12_Click:
Exit Sub

Err_Command12_Click:
MsgBox Err.Description
Resume Exit_Command12_Click

End Sub
 
Try this:
Code:
Private Sub Command12_Click() 
  On Error GoTo Err_Command12_Click 

  Dim stDocName As String 

  DoCmd.OpenReport "Planning Report"
  DoCmd.PrintOut acPrintAll, , , , 2
  DoCmd.Close acReport, "Planning Report", acSaveNo

Exit_Command12_Click: 
  Exit Sub 

Err_Command12_Click: 
  MsgBox Err.Description 
  Resume Exit_Command12_Click 
End Sub
 
Sorry to be a pain and thanks for the help, but the program now prints 1 copy of the selected report page and two copies of the form where the commond button is located.

Steve
 
Sorry 's mine :o
after "DoCmd.OpenReport "Planning Report" " add: , acViewPreview
 
This now works great and I ask only one more question, when the notes printout can I insert a command so as the indivisual notes are colleated together, I can do this with printer controls but can it be built into the print options??

thanks

Steve
 
Steve,

When you look in Help for PrintOut, you'll find de specification of this function. I don't think you did this, because you then didn't ask this question..

But Ok, add one argument to the DoCmd.Printout:
DoCmd.PrintOut acPrintAll, , , , 2, True

Set the last argument to True for sorting the prints.
 
Ok I tried using the help and whilst I found the section I still cannot get the printouts to come out as non-colleated (False) below is the section of code which should print 2 copies of each together and then the next page.

DoCmd.OpenReport "PlanningReport", acViewPreview
DoCmd.PrintOut acPrintAll, , , , 2, 0
DoCmd.Close acReport, "PlanningReport", acSaveNo

Any help please ?

Steve
 
Hi,

I should think it must be True instead of False?

DoCmd.OpenReport "PlanningReport", acViewPreview
DoCmd.PrintOut acPrintAll, , , , 2, True
DoCmd.Close acReport, "PlanningReport", acSaveNo

The last argument is the same as you use in the build-in print-dialogbox.
 
Thanks but I tried True, False, 0, -1 , 1 but it just seems to make no difference.

Steve
 
i seem to recall that it is Yes or No to collate copies. Default is YES

Steve
 
Sorry I have just looked at it ... it is
True (-1) and False (0)
which is what you have tried i think so no help there

Sorry about that
 
Thanks for all your help, I can only think the printer defaults must be overiding the code
but thanks anyway

Steve
 

Users who are viewing this thread

Back
Top Bottom