469,954 Members | 1,706 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,954 developers. It's quick & easy.

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 5421
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Andrei Gavra via .NET 247 | last post: by
2 posts views Thread by Smartin | last post: by
reply views Thread by SamSpade | last post: by
reply views Thread by Yong Wang | last post: by
2 posts views Thread by Gianni | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.