Log in

View Full Version : Solved: DoCmd.Printout



cath_hopes
11-12-2007, 06:17 AM
hi there!

I've added the VBA Docmd.Printout to click property of a button on one of my forms. The form is filtered so only the current record is printed.
The resulting printed document is split over 2 pages since the form is too wide for a sheet of A4.
Can I shrink the form print version so that the width of the form does not exceed A4 width? Or is there something in Access 2007/ VBA that would landscape the document instead?
I've checked the printer help function but it wasn't very helpful (I've an Epson Stylus Photo RX420 Series).

Norie
11-12-2007, 07:43 AM
cath

How about not printing the form in the first place?

Forms aren't really made for printing, why not try a report?

mattj
11-12-2007, 07:54 AM
I second Norie's reponse. Forms are really not your best option for printing - a report would work much better.
See http://www.mvps.org/access/reports/rpt0002.htm for how to print a report with the current record.

HTH
Matt

cath_hopes
11-12-2007, 10:57 AM
My client has requested that every form I build has a print option. There are 8 forms. I haven't any experience yet building reports but note your reports url. Won't building a matching report for each my 8 forms be somewhat time consuming? If that's the best way, then I guess it'll give me some practise. Otherwise I suppose I could just make each form narrower ..
Thanks for your comments and link.

mattj
11-12-2007, 11:16 AM
In that case, I would just create reports that look similar to the form...

Norie
11-12-2007, 01:07 PM
cath

If that what your client has requested I think they might be disappointed by the results when printing forms.

Note I not saying you can't add printing functionality to form, just that printing the actual form isn't the best idea.

By the way you mention 8 forms.

What is it each of these forms actually do?

cath_hopes
11-12-2007, 11:52 PM
All forms create, amend, delete records in a database made up of 9 tables. 4 of these are HR related (very simple and at a later stage I'll probably combine them into 2 forms).
The other 4 forms are business related. One of these is especially more complicated since it requires information from 7 of my 9 tables, with the ability to create, amend, delete records for 3 of these tables. It is this form that will be used the most during day to day business operations. I'm working on this form at the present (so expect more new threads!) as the others are just about complete apart from the print option.
Thanks Matt and Norie, I will create reports and print from them as you both suggest.