Share via

Command Button for Zoom Box in Access Form

Anonymous
2014-05-02T22:50:57+00:00

Is it possible to create a command button in Microsoft Access that does the zoom in function on click onstead of having to click CTRL and F2 at the same time?

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

8 answers

Sort by: Most helpful
  1. Anonymous
    2014-05-03T17:05:48+00:00

    ZoomBox: Interesting ... and something I have never used.

    I'm imagining this could be used in the instance of a GotFocus Event for a Memo field (or even a text field with 255 characters) on a form ...

    (perhaps even  on a datasheet-style subform?)

    Yeah ... I just tried it using a memo field on a datasheet subform and it works slick!:

    Private Sub CallNotes_GotFocus()

    If Len(Me!CallNotes) > 10 Then

        RunCommand acCmdZoomBox

    End If

    End Sub

    Was this answer helpful?

    10+ people found this answer helpful.
    0 comments No comments
  2. Tom van Stiphout 40,201 Reputation points MVP Volunteer Moderator
    2014-05-03T12:03:57+00:00

    I just realized a simple fix:

    Screen.PreviousControl.SetFocus

    RunCommand acCmdZoomBox

    Was this answer helpful?

    9 people found this answer helpful.
    0 comments No comments
  3. ScottGem 68,810 Reputation points Volunteer Moderator
    2014-05-03T03:36:26+00:00

    Put it in the double click event of the text box you want to Zoom.

    Was this answer helpful?

    5 people found this answer helpful.
    0 comments No comments
  4. ScottGem 68,810 Reputation points Volunteer Moderator
    2017-11-08T20:56:06+00:00

    We know you are running Access this is the Access forum. However, please don't piggyback on someone else's thread. Please use the Participate link above to start your own thread. and we will try to help.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  5. Tom van Stiphout 40,201 Reputation points MVP Volunteer Moderator
    2014-05-03T02:13:56+00:00

    I am assuming you mean the Zoom box and SHIFT+F2.

    No, that is not possible, and for good reason: what is there to zoom about the button? Access zooms the current control, not the previous one.

    If you really, really needed this, you could write code to keep track of the previous control, then upon button click you could set focus back to the previous control and run the one-liner:

    RunCommand acCmdZoomBox

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments