keyboard shortcut for zooming

B

BBran

Hello,

I am using Access 2007 (Office 2007 SP2) on XPSP2.

Is there a keyboard shortcut for zooming when in report view? I find
keyboard shortcuts much quicker than mouse movements.
 
F

fredg

Hello,

I am using Access 2007 (Office 2007 SP2) on XPSP2.

Is there a keyboard shortcut for zooming when in report view? I find
keyboard shortcuts much quicker than mouse movements.

Don't know about Access 2007 but in earlier versions:
Alt + Z
 
B

BBran

I cannot get that to work either, any ideas?


Jeanette Cunningham said:
Shift + F2 will do it in A2007.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
A

Albert D. Kallal

BBran said:
I cannot get that to work either, any ideas?


Shift f2 dont' work for me either. I not aware of a keyboard shortcut in
2007.

However, why not code your own?

You ahve to add ONE line to every reprot.

so, in the reports keydown even...add:

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

Call MyZoom(KeyCode, shift)

End Sub


Then, create a standard code module. Lets call it basRZoom

Simply paste in the follwing code:

Option Compare Database
Option Explicit


Sub MyZoom(Mykey As Integer, shift As Integer)

Dim zoomList As Variant
Static zPtr As Integer
Dim bolchange As Boolean

On Error GoTo MyZoom_Error

zoomList = Array(0, acCmdZoom25, acCmdZoom50, acCmdZoom75, acCmdZoom100,
acCmdZoom150, acCmdZoom200)
If zPtr = 0 Then zPtr = 3

If shift And acCtrlMask Then

bolchange = True
Select Case Mykey

Case vbKeyUp
zPtr = zPtr + 1
If zPtr > UBound(zoomList) Then
zPtr = 1
End If

Case vbKeyDown
zPtr = zPtr - 1
If zPtr = 0 Then
zPtr = UBound(zoomList)
End If

Case Else
bolchange = False

End Select

If bolchange Then
DoCmd.SelectObject acReport, Screen.ActiveReport.Name
DoCmd.RunCommand zoomList(zPtr)
Mykey = 0
End If


End If

On Error GoTo 0
Exit Sub

MyZoom_Error:

Exit Sub

End Sub

Now, when viewing a report opened in print preview, the ctrl up arrow, and
the ctrl-down arrow key will zoom in or out....
 
J

Jeanette Cunningham

Shift + F2 certainly does work for me in A2007. I have never had a problem
with it not working.
Put the cursor in a textbox and do shift F2 and the zoom box opens.
I haven't done anything special to enable the zoombox as far as I know.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
B

BBran

I now see where the confusion lies. I was talking about a report that is
open in "Print Preview". In that case Shift+F2 does not work for me.
 
R

Rick A.B.

Not sure if this is the cause but I've noticed that if I have an input
mask on the control, shift F2 does not seem to work.

Hope that helps.
Rick B
 
J

Jeanette Cunningham

Thanks Rick, that could explain the differences that we are seeing.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top