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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print function - Number of copies

Status
Not open for further replies.

radioman000

Technical User
Dec 19, 2003
10
0
0
US
Hello to all,

Is there a way in Access when printing from a print "button" utilizing a macro and printing the "selected record" to have a window pop up and ask how many copies you would like to print? I know that you can set the number of copies in the macro, but I need it to ask how many copies and allow a selection before printing the selected record.

Thanks

Radioman000
 
Instead of using a macro, try using vba command PrintOut.
something like this (untested):

Code:
    Dim intCopies As Integer
    intCopies = InputBox("Please enter number of copies", "Copies", 1)
    DoCmd.PrintOut , , , , intCopies, True

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks GingerR for your reply. I tried the code you suggested and it worked great except it wants to print all the records. I need this to only print the selected record. I tried adding the print range "acselection" to the DoCmd.Printout string and I get an error that says "Run-time error 2200. The number you entered is invalid". I am at a loss as to what this means. Can you help further?

Thanks so much

Radioman000
 
GingerR..

I figured the code out...here is the code that I used and it works perfectly!

Dim intCopies As Integer
intCopies = InputBox("Please enter number of copies", "Copies", 1)
DoCmd.PrintOut acSelection, 1, 1, acHigh, intCopies, True

Thanks again for your help! I hope this might help someone else as well.

Thanks again

Radioman000
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top