Printing a report to the printer

pfiroz

Registered User.
Local time
Yesterday, 20:38
Joined
Jan 21, 2009
Messages
27
Hi All :)
I have a pretty basic question but I've never done it before.
I built a report called 'rptPrintSearchResults'. I just want to write vba to print it to printer. How do I do that? It's based off a query that will change depending on the search the user does. Once the user does his/her search, the report should be updated and then I want to print it out....
thanks for any help!!
 
if there is no need for batch printing, or any other complications, why don't you just push Ctrl+P?
 
Hi,
Thanks for the reply. No I can't just hit Ctrl P because Im not going to be the one using the database. The database will allow the user to do a search and have the results display in a subform. The report is based on this and will update as the search changes. I have a button for the user to print the results in the subform. They shouldn't have to go find the report and then hit control P. If I could have the report print out when they click the button that would be great!!
Appreciate any help! :)
 
One of the arguments of OpenReport controls whether it prints out or previews. Check that out in VBA help.
 
Actually Paul,

I think the default opening with the OpenReport action prints the report automatically. set that argument to NORMAL, and you should be good to go when the report object opens. Paul is right.
 

Users who are viewing this thread

Back
Top Bottom