Zoom In action. (Shift + F2)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hyperpau
    Recognized Expert New Member
    • Jun 2007
    • 184

    Zoom In action. (Shift + F2)

    There is a certain feature in access that allows you zoom in a field to have a clearer view.
    For example, if the form is in datasheet view and the memo field only shows you the first few words of a memo, you can put the focus to the field and press Shift + F2 and the memo field would be zoomed in so you can see more from the field.


    My question is this, can you do this via VBA? so the user does not need to press Shifht+F2 anymore. Let's say, if the user double clicks the field, then the Shift+F2 function will automatically be called.
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    Originally posted by hyperpau
    There is a certain feature in access that allows you zoom in a field to have a clearer view.
    For example, if the form is in datasheet view and the memo field only shows you the first few words of a memo, you can put the focus to the field and press Shift + F2 and the memo field would be zoomed in so you can see more from the field.


    My question is this, can you do this via VBA? so the user does not need to press Shifht+F2 anymore. Let's say, if the user double clicks the field, then the Shift+F2 function will automatically be called.
    In the Double=Click() Event of whatever Controls you would like to see this feature:
    [CODE=vb]Private Sub txtTest_DblClic k(Cancel As Integer)
    SendKeys "+{F2}", True
    End Sub[/CODE]

    Comment

    • missinglinq
      Recognized Expert Specialist
      • Nov 2006
      • 3533

      #3
      ADezii's suggestion of using the Double-Click event is excellent, but because of known bugs, SendKeys should only be used as a method of last resort. Better here to simply use:
      [CODE=vb]Private Sub txtTest_DblClic k(Cancel As Integer)
      DoCmd.RunComman d acCmdZoomBox
      End Sub[/CODE]Linq ;0)>

      Comment

      • ADezii
        Recognized Expert Expert
        • Apr 2006
        • 8834

        #4
        Originally posted by hyperpau
        There is a certain feature in access that allows you zoom in a field to have a clearer view.
        For example, if the form is in datasheet view and the memo field only shows you the first few words of a memo, you can put the focus to the field and press Shift + F2 and the memo field would be zoomed in so you can see more from the field.


        My question is this, can you do this via VBA? so the user does not need to press Shifht+F2 anymore. Let's say, if the user double clicks the field, then the Shift+F2 function will automatically be called.
        Take ling's advice on this one, he is 100% correct. I just have this tendency to approach everything from a code perspective.

        Comment

        • hyperpau
          Recognized Expert New Member
          • Jun 2007
          • 184

          #5
          Originally posted by missinglinq
          ADezii's suggestion of using the Double-Click event is excellent, but because of known bugs, SendKeys should only be used as a method of last resort. Better here to simply use:
          [CODE=vb]Private Sub txtTest_DblClic k(Cancel As Integer)
          DoCmd.RunComman d acCmdZoomBox
          End Sub[/CODE]Linq ;0)>
          wow!!! great!!! thanks missingling. you are the one who answers most of my questions. almost every new knowledge i have comes from you! :)

          Comment

          • missinglinq
            Recognized Expert Specialist
            • Nov 2006
            • 3533

            #6
            Glad we could help!

            Linq ;0)>

            Comment

            • Scott Price
              Recognized Expert Top Contributor
              • Jul 2007
              • 1384

              #7
              And to be a pest :-) The shift + F2 does not actually Zoom, as in increase the apparent size of the viewed text, it opens a separate 'zoom' window with the current text inside it so all can be seen at once.

              This is just informational for whoever might stumble across the post in the future and think they've just found a cool new feature to 'zoom' in on something...

              Regards,
              Scott

              Comment

              Working...