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.
6 9947
What about making a report that replicates the look of the form.
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?
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.
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?
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.
Glad you found your answer, good luck.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: sea |
last post by:
I need to be able to print the current form because the form has an
embedded object of a .gif file, so report will not work -- does anyone
know the way to do this? I tried some code, not sure what...
|
by: Dino M. Buljubasic |
last post by:
I'd like to be able to print my form or some controls on it. I have found
lots of references for this but they all talk about printing a text document
from a form.
Any help will be appreciated...
|
by: Bernard Bourée |
last post by:
How to print a Form and to fit it with the printer page and layout ?
--
Bernard Bourée
bernard@bouree.net
|
by: SEEMORGHEJAVID |
last post by:
i want to print a form in vb2005 with microsoft printform component but
resolution of printed form is low and text in form is not good.
please guide me
|
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?
|
by: shaiful |
last post by:
Hi all, I have a very small problem that i want to print on form, I wrote code under commandbutton1:
Dim MyVar
MyVar = "Hello."
Debug.Print MyVar
but it doesnt work? could u pls tell my how i...
|
by: shaiful |
last post by:
Hi all, I have a very small problem that i want to print on form, I wrote code under commandbutton1:
Dim MyVar
MyVar = "Hello."
Print MyVar
its works in vb6, but it doesnt work in VBA? could...
|
by: Robson Felix |
last post by:
It may sound like a silly question, but I would like to print a form or
component from within Visual Studio when designing such form component. Is
that possible?
|
by: asedt |
last post by:
Hi
I'm trying to print a excel sheet in excell 2003, but it's a limit in the sheet that looks like a print area but it dosen't dissaper when chosing File -> Print Area -> Clear Print Area.
...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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...
|
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...
|
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,...
|
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...
|
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,...
|
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...
| |