Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Access VBA print forms automatically

Posted on 2011-09-13
4
Medium Priority
?
306 Views
Last Modified: 2012-06-27
Hi

I have Access forms that are used to generate timesheets for mine drillers.
I show a rough version in the image below.
There are 36 of them in this case.
How do I print off all 36 automatically?

 One of 36 Timesheets
0
Comment
Question by:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 48

Expert Comment

by:Dale Fye
ID: 36531825
I would recommend that you create a report that looks like your form.

Cannot remember how to do this in 2003, but in 2007, I've modified the Access Quick access Toolbar to include a Save As option.  If you open the form in design view, then do a Save As, you should be able to change the object type to a report.  (do this for both the main and subforms).

Then open the new report in design view, and change the SourceObject for your details to the subreport you created.

From there, you would go back to your original form, and add a button that opens the report.  I generally open the report in Preview mode, and then use the report shortcut menu to print it when I'm ready.
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 2000 total points
ID: 36532261
If you print out the form directly, it should print out all 36 records
or use code like this on a button on the form:
DoCmd.PrintOut acPrintAll


However if there are more records on the subform that can fit on the printout, it will only print what is visible on the screen.


This is why I am with fyed, in that you should develop a report that displays the same information, then print that.

In a report it is *much* easier to control the output with options like:
Page breaks
Can/Grow shrink
Grouping
Summaries
Sorting
...etc


JeffCoachman
0
 

Author Closing Comment

by:Murray Brown
ID: 36532536
thanks very much
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 36532585
For the record, can you state the ultimate solution here?

If you decided to use a report, then fyed also deserves some credit here as well, especially for suggesting this first.
0

Featured Post

Technology Partners: 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!

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

609 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