UtterAccess.com
We have detected that you are using an unsupported web browser. We recommend you to upgrade your web browser to get the most from UtterAccess forums.
Why should and how can I upgrade?
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> fit form to one page when printing    
 
   
MAbdul
post Mar 3 2005, 09:13 AM
Post #1

UtterAccess Addict
Posts: 201
From: Oxford, U.K.



Hi all,
I have a command button which prints the current form. Now it does not manage to fit the whole form onto one page. How may i fit the form onto one page when it prints?
This is the command button created by the wizard:
CODE
Private Sub Print_Form_Click()
On Error GoTo Err_Print_Form_Click
    DoCmd.PrintOut
Exit_Print_Form_Click:
    Exit Sub
Err_Print_Form_Click:
    MsgBox Err.Description
    Resume Exit_Print_Form_Click
    
End Sub

Any help appreciated, thanks in advance,
MA.
Go to the top of the page
 
+
R. Hicks
post Mar 3 2005, 09:17 AM
Post #2

UA Forum Administrator
Posts: 40,018
From: Birmingham, Alabama USA



You need to create and print a report instead of printing the form ...
Forms are on optimized to be printed as reports are ...
But the data must fit in the physical dimensions of the paper you are printing to ...
You must also compensate for the print margins ...
RDH
Go to the top of the page
 
+
MicroE
post Mar 3 2005, 09:19 AM
Post #3

UtterAccess VIP
Posts: 4,034
From: NY - USA



You should create a report, and then call the report using docmd.openreport.
The report would allow you to make and manage print settings.
Go to the top of the page
 
+
MAbdul
post Mar 3 2005, 09:32 AM
Post #4

UtterAccess Addict
Posts: 201
From: Oxford, U.K.



Hi guys,
Thanks for the reply but how may i get the details of the text and combo boxes that the user is viewing currently on the form to be displayed on the report, baring in mind some of the information is being entered by the user so is not held in any table or query as yet?
Thanks in advance,
MA.
Go to the top of the page
 
+
R. Hicks
post Mar 3 2005, 09:36 AM
Post #5

UA Forum Administrator
Posts: 40,018
From: Birmingham, Alabama USA



Create the report with the necessary criteria to get the data that is stored on the current form ..
For the unbound controls on the form .. reference these controls from the report to get the needed values .. but to do this, the form must remain open until the report has referenced the needed values ..
DH
Go to the top of the page
 
+
MicroE
post Mar 3 2005, 09:39 AM
Post #6

UtterAccess VIP
Posts: 4,034
From: NY - USA



You can add a text box to a report and set the control source to
=[Forms]![Form Name]![Textbox Name]
Go to the top of the page
 
+
MAbdul
post Mar 3 2005, 09:56 AM
Post #7

UtterAccess Addict
Posts: 201
From: Oxford, U.K.



Thanks guys,
I have got it working, much appreciated.
MA. cool.gif
Go to the top of the page
 
+
R. Hicks
post Mar 3 2005, 09:59 AM
Post #8

UA Forum Administrator
Posts: 40,018
From: Birmingham, Alabama USA



Great .... You are Welcome ... wink.gif
DH
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Search  ·  Go to Top  ·  Lo-Fi Version Time is now: 24th October 2014 - 02:00 AM

Tag cloud: