UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Closed TopicStart new topic
> How to print a Form    
 
   
GlenKruger
post May 2 2006, 10:07 PM
Post #1

Utterly Crispy UA Forum Administrator
Posts: 7,628
From: Edmonton,Alberta,Canada



I have seen so many ask how do I print a form?

Normally you don't print forms you use reports but when the need arises here is how you do it.

The Form must be open it can be hidden but it must be open.

The code you use is as follows:

DoCmd.SelectObject acForm, "Your Forms Name Goes Here"
DoCmd.PrintOut acPages, 1, 1

This can be called from the click event of a button on another form or from inside a Function.


In Access2002, many more options are available.
You can choose print quality, landscape/portrate, which pages etc
I think paper size, print margins can be changed as well, whereas in Access2000 they can not.

For example:

Printer.Orientation = acPRORPortrait
DoCmd.PrintOut PrintQuality:=MyPrintQualityG, _
Printrange:=MyPrintRangeG, PageFrom:=MyPageFromG, _
PageTo:=MyPageToG, Copies:=MyCopiesG


The printer object was new in A2002,
check the help file for more info.

Hope this helps someone who really needs to print a Form.

Edited by: GlenKruger on Thu Jun 29 19:21:23 EDT 2006.
Go to the top of the page
 
+

Thank you for your support! Closed TopicStart new topic

Jump To Forum:
 



RSS Search  ·  Go to Top  ·  Lo-Fi Version Time is now: 24th April 2014 - 05:49 AM

Tag cloud: