473,803 Members | 3,637 Online
Bytes | Software Development & Data Engineering Community
+ 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 5835
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 cmdPrintCurrent Record, and
in its Click event procedure put this code:

DoCmd.OpenRepor t "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.co m> wrote in message
news:%7******** ************@ne wssrv26.news.pr odigy.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
1320
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 in page based on page width, height and papermargins. I also want to say that the margins are different whenI choose landscape, but not the page size. I would appreciate very much any answer. -------------------------------- From: Andrei Gavra...
0
252
by: PC User | last post by:
============================= Problem: ============================= How to printout a richtextbox on an MS Access 2K form. ============================= ============================= Step by Step Solution: =============================
2
3580
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 Print button to simply print out the form. Problem is, DoCmd.PrintOut only produces a blank page. (Actually once in testing, it printed the form module's code, but not the form.) In another app I am working on, PrintOut successfully prints the...
0
790
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 longer have the large margins at the top and bottom (unless I reset them). They will now be at the sides of the text. Word also works that way so I don't imagine I can change it but I wanted to at least ask. Anything I can tell PrintDocument so...
0
993
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 ' ',string.ljust(str(ports, 3), print ' ',string.ljust(PortlinkbeatInv],14), print ' ',string.ljust(PortStatusInv], 19), print ' ',string.ljust(PortTestResultInv],17), print ' ',string.ljust(PortVisualInv],19),
6
10049
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 prints the entire query result behind the form. How does one do what VB says it will do:
4
8751
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
5678
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 work also with the others. Thank you for any help! (&sorry for my english) Gianni
4
2463
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 prints the form in portrait mode, but I want to print the form in landscape mode. What should I do?
0
9703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9564
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10069
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9125
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6842
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.