[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1835
  • Last Modified:

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
0
david_88
Asked:
david_88
  • 3
  • 2
1 Solution
 
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
 
Jupiler78Commented:
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
 
david_88Author Commented:
yeah thanks
0
 
Jupiler78Commented:
Glad I could help.
Good luck and thanks for the points & grade.

Jupiler78
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now