Solved

Access VBA print forms automatically

Posted on 2011-09-13
4
302 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 (Access MVP)
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 500 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
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…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

717 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