PgUp & PgDn to work on report open, focus on page selector

bignose2

Registered User.
Local time
Today, 04:11
Joined
May 2, 2010
Messages
251
Hi,

I have a report with multiple pages, in Print Preview

Page Up & Page down do not automatically move to the next Page/Record or even up & down the page if if zoomed out.

I have to click the page/ record selector at the bottom, I assume so that has the focus (I know not the focus in the normal sense)

Then I can page up & page down to forward & back through the pages.

Is there a way to open the report & it be in this state from the off

It would also be nice, if zoomed in, at the press of a button (perhaps keypress) that would zoom out to full page view that then immediately allow page down & page up to the NEXT page straight away.

While I'm here the other thing I would quite like it if it is possible to change the view (again with keypress) from print preview to report view & visa versa - without closing & opening the report.

Also is it possible to zoom RunCommand acCmdZoom150 a different value not just the set ones, I guess not but thought worth asking. ie. would erally like 125.

Thanks I/A
 
instead of print preview, you can open the report in LAYOUT view ,then PGDN will work continuously.

DoCmd.OpenReport "rNames", acViewLayout
 
Thanks for you reply, prefer print preview for what I want,

Found my own solution, I find that zooming, even to the level already at seems to let pgup & pgdown work straight off.

I now have it so I zoom to the levels I want with + & -
PgUp & PgDn works immediately but also if zoomed IN & press PgUp etc I want to go to next page anyway, so zooms out and the keycode continues onto next page, great result. Never knew it had all this zoom in & out & especially a property with the current zoom level.


Private Sub Report_KeyDown(KeyCode As Integer, Shift As Integer)

Select Case KeyCode


Case Is = 33 ' Pages Up

tempzoom = Reports("Main In-Out").ZoomControl ' just a refresh (zoom same level) hopefully allow pg up/dn to work

If tempzoom <> 0 Then
Reports("Main In-Out").ZoomControl = 0 ' if zoomed in & pgup still want to got to next page
Else
Reports("Main In-Out").ZoomControl = tempzoom ' just refresh
End If

Case Is = 34 ' Page down

tempzoom = Reports("Main In-Out").ZoomControl

If tempzoom <> 0 Then
Reports("Main In-Out").ZoomControl = 0
Else
Reports("Main In-Out").ZoomControl = tempzoom
End If


Case Is = 109 ' - minus, zoom out

tempzoom = Reports("Main In-Out").ZoomControl
If tempzoom = 150 Then Reports("Main In-Out").ZoomControl = 130
If tempzoom = 130 Then Reports("Main In-Out").ZoomControl = 0


Case Is = 107 ' + Zoom in

tempzoom = Reports("Main In-Out").ZoomControl
If tempzoom = 0 Then Reports("Main In-Out").ZoomControl = 130
If tempzoom = 130 Then Reports("Main In-Out").ZoomControl = 150


' RunCommand acCmdZoom150
' RunCommand acCmdZoom100 ' fine, but no preset to 125, limited range
' RunCommand acCmdFitToWindow ' works fine

End Select

End Sub
 

Users who are viewing this thread

Back
Top Bottom