Put Button Which Allow To Select The Printers Available At Ur PC.

B

billy_pit

Hi,
I know this is the simple problem for experts so I will get reply
quickly.
I have one project in MS Access.
In that I have one form for search criteria.
now when I click on search button on that form it will open subform in
seprate window.
Now I want to print this page.so I put button using wizard and put in
its click event to print the report.This is the code

Private Sub Print_Click()
On Error GoTo Err_Print_Click


DoCmd.PrintOut

Exit_Print_Click:
Exit Sub

Err_Print_Click:
MsgBox Err.Description
Resume Exit_Print_Click

End Sub

when I press that button it will print report on default printer in
network attach to my pc.
But I want to print it on another printer in network in another
department.
so it will easy for them, otherwise they have to come to my office to
collect it.
So when I click on that button instead of print that page directly it
have to show me another window from which I can select available
printer in network on my PC.

This is just same like when we click on PRINT in FILE MENU of any
browser.

Thanks
 
A

Allen Browne

See:
Printer Selection Utility
at:
http://allenbrowne.com/AppPrintMgt.html
It shows how to set the Printer before opening the report. Requires Access
2002 or later, but there are links for other solutions in Access 2000 and 97
as well.

If you know ahead of time which printer the report should go to, you can
open the report in design, view, choose Page Setup on the File menu, and
specify a Specific Printer for this report. (This doesn't work properly in
Access 2007.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top