Access VBA Preview / Printing Report

I have a report which i want to create 2 buttons 1 to preview the report and the other to print the report in 1 click ie print to deafult printer and based on page ranges saved in table.

i have the below code to preview but don't know how to get that to print.  In 2007 how do you convert a macro to vba code

DoCmd.OpenReport "rpt_printorders", acViewPreview

dave
david_88Asked:
Who is Participating?
 
Jupiler78Connect With a Mentor Commented:
Oh ok, I never work that way.
So on that part I can't offer any help I think.
How did you do that on 2003 then?

Did the DoCmd.printout work?
0
 
Jupiler78Commented:
Hello david_88,

DoCmd.printout

What do you mean by the convert macro?

Regards,

Jupiler78
0
 
david_88Author Commented:
sometimes its easier to create a macro and then convert to vba which you could do in 2003
0
 
david_88Author Commented:
yeah thanks
0
 
Jupiler78Commented:
Glad I could help.
Good luck and thanks for the points & grade.

Jupiler78
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.