Solved

Access VBA Preview / Printing Report

Posted on 2008-10-14
5
1,814 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Server configuration for MS Access - SQL Server app 8 69
hit enter key to run macro 13 23
Should I keep recordsets open? 3 23
Binding recordsets to a form 6 22
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

776 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