473,473 Members | 1,984 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Printout of open form in landscape format

P
Hi,

Access 2002. I am trying to use the PrintOut function to print the current
record of the current open form in landscape format to the default Windows
printer. Any suggestion on how to set the printout to landscape mode? Thank
you. P
Nov 12 '05 #1
1 5802
Hi P

Create a report based on your table(s) displaying the fields you want
printed, and format the report exactly how you want it - page orientation,
margins, etc. If the required layout is similar to your form, then you
could start with File>Save As>Report.

Now, place a command button on your form, named cmdPrintCurrentRecord, and
in its Click event procedure put this code:

DoCmd.OpenReport "name of report", _
WhereCondition:="[name of primary key field]=" _
& Me.[Name of primary key field]

If your primary key is a text field, you will need to wrap the value in
quotes:
...
& chr(34) & Me.[Name of primary key field] & chr(34)

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

"P" <P@no_spam.com> wrote in message
news:%7********************@newssrv26.news.prodigy .com...
Hi,

Access 2002. I am trying to use the PrintOut function to print the current
record of the current open form in landscape format to the default Windows
printer. Any suggestion on how to set the printout to landscape mode? Thank you. P

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Andrei Gavra via .NET 247 | last post by:
Hello. I have a problem when I choose landscape format forprinting. The page width and height are remaining the same asfor portrait format. In portrait format everything is ok and I'mposition my text...
0
by: PC User | last post by:
============================= Problem: ============================= How to printout a richtextbox on an MS Access 2K form. ============================= ============================= Step by...
2
by: Smartin | last post by:
Question about DoCmd.PrintOut in A97. I have a form on which all the controls are unbound. There is a large textbox that the user can type stuff in and a couple labels. I am trying to code a...
0
by: SamSpade | last post by:
If I format a page as portrait with 2 inch margins at the top and bottom and 1 inch margins at the sides and print it. Then I decide I want to print landscape and change to landscape I will no...
0
by: Yong Wang | last post by:
Hi, I have a data set like row = , , ] when I use loop to print out data, I got compile error in printout statment. while j<24: print ' ',string.ljust(str(units), 5), print '...
6
by: EJO | last post by:
TIA, There is already a form (Access 2k) with the selected record and a button with this code behind it: DoCmd.PrintOut acSelection Except that Access does not print the acSelection, it...
4
by: Deano | last post by:
I'm in the situation of having to print a form - not a report. This will fit nicely in a landscape format but by default it prints portrait. Is there any code to make it play nice?
2
by: Gianni | last post by:
hello dudes i want to print a html page in landscape format. Is there a possebility to do it with css? i read about a landscape task in css which workes with the opera- browser. but it should...
4
by: sarn555 | last post by:
Dear, I want to print a VB6 form in landscape orientation and it should be done in a running mode. I mean through coding everything must be done at runtime. By default, the Form.PrintForm method...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.