Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    May 2001
    Location
    Patterson Lakes, Melbourne, Victoria, Australia
    Posts
    637
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have been calling a function I call ZoomIn() for years. On double clicking a Text Box control, it zooms the control and moves to the end of the text in the control.
    The code basically is: SendKeys "+{F2}" & "^{END}", True.
    I have just updated 2 computers to Vista and this SendKeys now does nothing on both of them. It still works in XP.
    Any ideas anyone?
    Regards,
    Peter

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    [quote name='Peter Kinross' post='770989' date='17-Apr-2009 18:18']I have been calling a function I call ZoomIn() for years. On double clicking a Text Box control, it zooms the control and moves to the end of the text in the control.
    The code basically is: SendKeys "+{F2}" & "^{END}", True.
    I have just updated 2 computers to Vista and this SendKeys now does nothing on both of them. It still works in XP.
    Any ideas anyone?[/quote]

    I don't think this is any help to you, but...

    I just copied your code, and pasted it into the On click event of a text box , using 2007 and Vista, and it worked!

    I then put it into a functionZoomIN() and it still worked.

    But when I used a Double Click event it did not work.
    Regards
    John



  3. #3
    5 Star Lounger
    Join Date
    May 2001
    Location
    Patterson Lakes, Melbourne, Victoria, Australia
    Posts
    637
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I just copied your code, and pasted it into the On click event of a text box , using 2007 and Vista, and it worked!

    I then put it into a functionZoomIN() and it still worked.

    But when I used a Double Click event it did not work.

    Thanks John, but for obvious reasons it has to be a double click. Strange one, this code has worked for many years.
    Regards,
    Peter

  4. #4
    5 Star Lounger
    Join Date
    May 2001
    Location
    Patterson Lakes, Melbourne, Victoria, Australia
    Posts
    637
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='johnhutchison' post='770990' date='17-Apr-2009 17:34']I don't think this is any help to you, but...

    I just copied your code, and pasted it into the On click event of a text box , using 2007 and Vista, and it worked!

    I then put it into a functionZoomIN() and it still worked.

    But when I used a Double Click event it did not work.[/quote]

    I put in a 0.2 second delay loop and now it works fine. I couldn't get the delay shorter than 0.2 sec though.
    Regards,
    Peter

  5. #5
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    [quote name='Peter Kinross' post='770991' date='17-Apr-2009 18:38']I just copied your code, and pasted it into the On click event of a text box , using 2007 and Vista, and it worked!

    I then put it into a functionZoomIN() and it still worked.

    But when I used a Double Click event it did not work.

    Thanks John, but for obvious reasons it has to be a double click. Strange one, this code has worked for many years.[/quote]

    If pressing Enter would be an acceptable alternative you could use the Key Down event.

    If KeyCode = vbKeyReturn Then
    SendKeys "+{F2}" & "^{END}", True
    End If


    Just had another idea. This does work with a Double Click.

    DoCmd.RunCommand acCmdZoomBox
    Regards
    John



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •