A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Printing in Landscape via an Embedded Macro



 
 
Thread Tools Display Modes
  #1  
Old April 14th, 2010, 08:06 AM posted to microsoft.public.access.gettingstarted
Summing multiple fields on a form
external usenet poster
 
Posts: 38
Default Printing in Landscape via an Embedded Macro

I created a form and added a button with the embedded Macro that prints the
current record only. The macro arguments a select record, print record.
My problem is that it prints the record in portrait. I need it to print
landscape. How do I change it from portrait to landscape??? HELP
  #2  
Old April 14th, 2010, 09:26 AM posted to microsoft.public.access.gettingstarted
Wayne-I-M
external usenet poster
 
Posts: 3,674
Default Printing in Landscape via an Embedded Macro

Hi

Try this - much better than printing a record from a form

Design a report that is based on the same data as your form so it looks good

“ensure” that the report and the form both have the ID (primary) field
somewhere – this can be hidden if you like)

Open the report in design view
Select - File
Select - Page set up
Select - Print from a specific printer, choose your printer from the list
Define the print options (like landscape, portrait, etc)
Save the report

Next add a button to your form to print the report
Add this to the code behind the button

Private Sub Add Button Name here _Click()
DoCmd.OpenReport "Add report name here", acViewNormal, "", "[Add report
control name here]=[Forms]![Add form name here]![Add form control name
here]", acNormal
End Sub

Note –
Report control name and Form control name are the controls that hold the ID
field - they must both be the same data type

So if you are on record 1234
The report will print with only details of record 1234

Hope this helps



--
Wayne
Manchester, England.



"Summing multiple fields on a form" wrote:

I created a form and added a button with the embedded Macro that prints the
current record only. The macro arguments a select record, print record.
My problem is that it prints the record in portrait. I need it to print
landscape. How do I change it from portrait to landscape??? HELP

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:23 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 OfficeFrustration.
The comments are property of their posters.