Printing in Landscape via an Embedded Macro

  • Thread starter Summing multiple fields on a form
  • Start date
S

Summing multiple fields on a form

I created a form and added a button with the embedded Macro that prints the
current record only. The macro arguments are: 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
 
W

Wayne-I-M

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top