Solved

Access VBA Preview / Printing Report

Posted on 2008-10-14
5
1,817 Views
Last Modified: 2010-04-21
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
Comment
Question by:david_88
  • 3
  • 2
5 Comments
 
LVL 8

Expert Comment

by:Jupiler78
ID: 22709593
Hello david_88,

DoCmd.printout

What do you mean by the convert macro?

Regards,

Jupiler78
0
 

Author Comment

by:david_88
ID: 22709626
sometimes its easier to create a macro and then convert to vba which you could do in 2003
0
 
LVL 8

Accepted Solution

by:
Jupiler78 earned 500 total points
ID: 22709634
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
 

Author Closing Comment

by:david_88
ID: 31505802
yeah thanks
0
 
LVL 8

Expert Comment

by:Jupiler78
ID: 22709756
Glad I could help.
Good luck and thanks for the points & grade.

Jupiler78
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question