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!

Printing

Status
Not open for further replies.

leslied

MIS
May 29, 2003
108
0
0
US
Can I set a certain report to print only on a particular type of paper, namely that of the 14 7/8 X 11 paper
This is the type that banks print there reports on and so on....
is this possible? if not, when the user clicks on the print button, can I tell it to print to a particular printer that uses that type of paper?

thanks
 
Better yet, If i can't do what I asked previously, upon choosing the print option, do I need to put in any code so that a printer cn be chosen? or windows does that automatically? Sorry if this seems like a stupid question, but i don't know so I am asking

thanks again
 
This really depends on your situation.

Are you wanting to print the report on command like for example:

DoCmd.OpenReport "YourReportName"

and be able to select where you want to print, what kind of paper, etc.?

If so, I would suggest using Send Keys. By this I mean tell Access programmatically what you want keyed.

For example, the following code will open the report and with it the Print dialog.

''''''''

'''Open the report in preview mode.
DoCmd.OpenReport "YourReportName", acViewPreview
'''Programmatically key Control + p
SendKeys "^p"

''''''''

SendKeys "^p" tells Access to accept the keying combination of Control and P (which if pressed together makes the Print dialog open).

I tried to keep my example simple so that it's easier to understand. Send keys is pretty limitless in that you could probably determine exactly what keys needed to be keyed to select the type of paper you need and to print. You could include all this in your SendKeys command.

Probably the easiest way to build your Send Keys command would be through a macro.

1Create a new macro
2Select SendKeys from the list of actions
3There is a Keystrokes field down toward the bottom where you can enter the needed keystrokes.

Hope this helps you.

If this is not what you need let me know and we can attack from another angle.
 
As an alternative...if this report will be going to the same printer all the time, you can also accomplish this without code if you would like. While editing the report, 1)click "File" 2)then "Page Setup" 3)then the "Page" tab 4)then "Use specific printer" 5)then the "Printer" button. You will be able to select the specific printer that you want the report to go to.
This is just one method...I hope you find the one that is right for you. Hope this helps.

Good luck

mk


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top