By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,454 Members | 3,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,454 IT Pros & Developers. It's quick & easy.

How Do I Limit Print Area on a Form

tdw
100+
P: 206
the View Orders form in my Access database has a Print button on it. It has other buttons too, like Edit etc. These buttons used to be at the bottom of the form laid out horizontally, but this was causing the form to be just long enough vertically that some people when viewing it on their screen would have to scroll up or down to see the top or bottom of the form.
So, my solution was to make the form wider and move the command button over to the right side of the form, stacked vertically.
Great, it fits on everyone's screen without scrolling.
But now the problem is, the form is just wide enough that when I click the Print command button, it prints a second blank page every time (because the form is wider than a single sheet of paper). I have tried to figure this one out on my own but can't seem to get it to only print a single sheet. I don't need it to all fit, because the wider part is just for space for the command buttons, which are visible on screen only.
I tried to set it to print page 1 to page 1, but apparently it still thinks that the wide part IS part of page 1, and I still get the extra blank sheet every time.
How I can I make it only print one sheet, regardless of the size of the form? Keep in mind I don't want to "shrink to fit".

Thanks

P.S. the Print command button is linked to a Macro that simply uses PrintOut.
Feb 5 '08 #1
Share this Question
Share on Google+
6 Replies


Rabbit
Expert Mod 10K+
P: 12,366
What about making a report that replicates the look of the form.
Feb 5 '08 #2

tdw
100+
P: 206
tdw
What about making a report that replicates the look of the form.
Good idea. Is that my best option? It would require some rewriting of code in a couple of places. There isn't some simple command that I'm missing to make it just print the single sheet?
Feb 5 '08 #3

Rabbit
Expert Mod 10K+
P: 12,366
Nothing comes to mind off the top of my head. Short of using code to move the controls and then crop the form itself. Then again, I don't know if you're allowed to change the size of the form without being in design view. Although I guess it would be an interesting experiment.
Feb 5 '08 #4

tdw
100+
P: 206
tdw
Ok, I've created a report that mimics the form. A Macro opens the report, filtering it to include only the record that is open in the form, prints it, then closes the report.
But it keeps popping up a window that says "Print Macro Definitions" with some checkbox options, and then it prints an additional sheet that, at the top, says C:\ORDERS DATABASE\ORDERS DATABASE_fe.mdb Macro: PRINT ORDER Tuesday, February 05, 2008 Page:1

I don't want that window to pop up, and I don't want that extra sheet to print. Why is it doing that?
Feb 5 '08 #5

tdw
100+
P: 206
tdw
Ok, I've created a report that mimics the form. A Macro opens the report, filtering it to include only the record that is open in the form, prints it, then closes the report.
But it keeps popping up a window that says "Print Macro Definitions" with some checkbox options, and then it prints an additional sheet that, at the top, says C:\ORDERS DATABASE\ORDERS DATABASE_fe.mdb Macro: PRINT ORDER Tuesday, February 05, 2008 Page:1

I don't want that window to pop up, and I don't want that extra sheet to print. Why is it doing that?
I found the answer. It's because I didn't need the PrintOut command in the macro. It automatically prints the report when it opens it.
Feb 5 '08 #6

Rabbit
Expert Mod 10K+
P: 12,366
Glad you found your answer, good luck.
Feb 5 '08 #7

Post your reply

Sign in to post your reply or Sign up for a free account.