Print Preview of multiple pages (1 Viewer)

mcescher

Busy as usual
Local time
Yesterday, 23:08
Joined
Mar 19, 2018
Messages
28
Currently using Access 2010

When I use a DoCmd.OpenReport "myreport" on a multi-page report, Access defaults to "One Page" mode. I can right-click and choose multiple page mode from the menu, but my users are running with the runtime engine and no right click menu shows up.

Can I default the report to open either wide or long so that multiple pages show up? Didn't see anything in the report properties or the OpenReport arguments.

HELP!:banghead:
 

isladogs

MVP / VIP
Local time
Today, 05:08
Joined
Jan 14, 2017
Messages
18,209
In your form Print button code add this line immediately after DoCmd.OpenReport line:

Code:
DoCmd.RunCommand acCmdPreviewTwoPages

Or replace Two with Four / Eight / Twelve / One as required

NOTE: it is also possible to adjust zoom using VBA

Code:
DoCmd.RunCommand acCmdZoom50

Here you can also use 10/100/1000/150/200/25/500 instead of 50
 

mcescher

Busy as usual
Local time
Yesterday, 23:08
Joined
Mar 19, 2018
Messages
28
That did the trick!

I did notice that it came up side by side. Is there a way to specify on top (like viewing a PDF document)

THANKS!!!
 

isladogs

MVP / VIP
Local time
Today, 05:08
Joined
Jan 14, 2017
Messages
18,209
That did the trick!

I did notice that it came up side by side. Is there a way to specify on top (like viewing a PDF document)

THANKS!!!

Not possible in print preview.
You can open in report view instead where pages flow continuously in a vertical direction if you see what I mean
 

mcescher

Busy as usual
Local time
Yesterday, 23:08
Joined
Mar 19, 2018
Messages
28
Thanks for your answers. Seems odd that you can't do that in code. Since you can with the right-click context menu.

Thanks again!
 

isladogs

MVP / VIP
Local time
Today, 05:08
Joined
Jan 14, 2017
Messages
18,209
Hang on. What exactly did you mean by 'on top'?
 

mcescher

Busy as usual
Local time
Yesterday, 23:08
Joined
Mar 19, 2018
Messages
28
BTW, don't know how to mark your first answer as the solution, but it was 100% correct.
 

mcescher

Busy as usual
Local time
Yesterday, 23:08
Joined
Mar 19, 2018
Messages
28
page1
page2

Rather than

page1 page2

Looked deeper into the code you gave and didn't see anything that specified that, and other than 4,8, etc page wide, there weren't any other codes that I found.
 

isladogs

MVP / VIP
Local time
Today, 05:08
Joined
Jan 14, 2017
Messages
18,209
That's what I thought in the first place.
You can't do that in code or using the ribbon in print preview.
If you want that, use report view .... But it's continuous with no 'pages'

I didn't understand your comment about the context menu .
It can't be done from there either...other than using report view

To mark a thread as solved, go to the Thread tools button in the blue bar at the top
 

mcescher

Busy as usual
Local time
Yesterday, 23:08
Joined
Mar 19, 2018
Messages
28
In report preview mode, I can right-click on the report and in the context menu, choose either "One Page" or "Multiple Pages". When I choose "Multiple Pages" a flyout appears and give a representation of the pages. That's how I can set up "Wide" or "Tall" in report preview mode. (picture representation here)
tinyurl dot com slash yahoxugm

Thanks again for all your help!
 

isladogs

MVP / VIP
Local time
Today, 05:08
Joined
Jan 14, 2017
Messages
18,209
No such thing as report preview mode.
I think you mean print preview mode. In that mode, the context menu replicates what the print preview ribbon shows and has the same items as you can get using vba.
Report view is a different mode entirely.
 

mcescher

Busy as usual
Local time
Yesterday, 23:08
Joined
Mar 19, 2018
Messages
28
Yes, I miss-typed, it is Print preview. But the context menu gives more options than the ribbon. In print preview mode, I can arrange the report as tall rather than wide.

This link is a picture to show what I'm seeing. tinyurl.com/yahoxugm
 

mcescher

Busy as usual
Local time
Yesterday, 23:08
Joined
Mar 19, 2018
Messages
28
Finally figured out how to post the picture...:banghead:
 

Attachments

  • Reports.jpg
    Reports.jpg
    34.9 KB · Views: 134

isladogs

MVP / VIP
Local time
Today, 05:08
Joined
Jan 14, 2017
Messages
18,209
Thank you!
I've been using access almost 20 years and never realised you could do that!
But its definitely not in the ribbon & I can't find a command to do that using VBA
I'll do some research later ....
 

mcescher

Busy as usual
Local time
Yesterday, 23:08
Joined
Mar 19, 2018
Messages
28
Glad I could clarify that. Yeah, I looked around after you gave me the initial codes, but didn't find anything to specify which direction. My google-fu was weak that day ;)
 

Users who are viewing this thread

Top Bottom