Form only printing first page

skp

Registered User.
Local time
Today, 07:36
Joined
Feb 28, 2011
Messages
21
I have been given the job of maintaining and fixing a database that was created by someone else and there is a Reports page that is actually a Form and the other users will be printing this in database view not from design view. There is a "Print" button set up that is working perfectly fine except when it prints it will only print the 1st page of the form and I can't figure out why.

Here is the code I have on the button:

Private Sub cmdPrint_Click()
Forms("frmReports").Printer.Orientation = acPRORLandscape
DoCmd.PrintOut , 1, 1, acLow, 1, False
End Sub

Is there a way to have the printer dialog menu pop up when printing from database view so the user could specify the number of pages and all of that?
 
Private Sub cmdPrint_Click()
Forms("frmReports").Printer.Orientation = acPRORLandscape
DoCmd.PrintOut , 1, 1, acLow, 1, False
End Sub
The problem is highlighted in red.

To open print dialog -->

DoCmd.RunCommand acCmdPrint
 
Welcome to the forum!

I can't answer why it only prints out the first page though I will say it is not the first time I heard this when trying to use forms for printing. Is there a reason you can't create a report and use it for printing? Forms are designed for viewing, editing and adding data not for printing that said data.
 
Welcome to the forum!

I can't answer why it only prints out the first page though I will say it is not the first time I heard this when trying to use forms for printing. Is there a reason you can't create a report and use it for printing? Forms are designed for viewing, editing and adding data not for printing that said data.
I didn't even pick up on the fact that it's a form :o:)
 
@vbaInet...

I'm going to say a wee bit more coffee is in order! :D
 
Thank you! the print dialog seems to be the solution. and it was already set up as a form when I took over the database, not sure why it wasn't created as a report but it seems to be working great now that the dialog opens up.
 
Well nevermind on that working great. The first page prints fine but then the rest of the pages are just coming out blank.
 
When you say FIRST PAGE - what exactly do you mean? Forms do not have pages except in printing and it would create a very long form if you do have "pages" actually for the form (like using the page break).

Are you really meaning TAB PAGES on a form. And if you do, there isn't a way to print them all that I am aware of. Can you upload a screenshot (to this site and not a public photo sharing site as those are blocked by my workplace) so we can actually SEE what you are talking about?
 
I guess the logical fix is to swith the form into a report...I'm fairly new to this so is this something as easy as copying the code from the form and pasting it in a new report or will I need to create a report from scratch?
 
The form has about 2000 records listed in it, and when I print even using the dialog and enter the page range it will only print what can fit on the first page of paper and then the rest just come out blank. I can't upload a screenshot because all the records listed contain confidential information of individuals and I'm sort of bound by law not able to post it.
 
The form has about 2000 records listed in it, and when I print even using the dialog and enter the page range it will only print what can fit on the first page of paper and then the rest just come out blank. I can't upload a screenshot because all the records listed contain confidential information of individuals and I'm sort of bound by law not able to post it.
You should be able to just move the form to a new record and then all fields should be blank and then screenshot that, no?

But anyway, my suspicions are that you actually have a tabbed control which are your "pages" that you have and printing will not show those. There isn't a way to do that. You would need to create a report for that if that is the case.
 
All the records are of individuals that are already input by the users so there are no blank ones. I've never created a report before, would I be able to just copy paste the code from the Form to the Report?
 
The form is set up by rows, 1 row per individual that are just listed one row on top of the other (sort of like an excel spreadsheet) and contain name, address, phone etc, when I print the first 50 or so come out on the first page and the rest of the pages come out blank. I'm not sure if there is a tabbed control for the pages or not.
 
All the records are of individuals that are already input by the users so there are no blank ones. I've never created a report before, would I be able to just copy paste the code from the Form to the Report?

Nope. You can START the process by going to the form in design view and then to SAVE AS and select Report. Then you will have to go make a bunch of changes and if you do have the tab control on the form which I am thinking you do, then it will take a lot more than doing that. You will most likely have to create subreports to display the correct information. Too bad you can't upload anything that would help us give you specific direction. Maybe you could ask someone if there is a way to get a blank copy of the form so you can post that. But I can undertand being unable to post due to specific legal restrictions and/or company policy.
 

Users who are viewing this thread

Back
Top Bottom