Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Apr 2002
    Location
    Onekama, Michigan, USA
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SendKeys with Vista (Access97)

    I have a form that contains a combo box to select an item. Upon selecting an item from the list, the AfterUpdate event is used to perform a SendKeys action (enter Key, "~") in order to move the focus and the cursor to the subform that contains the items' respective records. Everything has been working fine until I installed a runtime version on a Vista computer. When an item is selected from the list, a box pops up with a "Permission denied" statement. Within this box is an OK button. When the OK button is pressed, everything proceeds normally. It appears that the SendKeys action is a security risk for Vista. Is there another way to code the SendKeys action to be "Vista friendly"?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: SendKeys with Vista (Access97)

    Try replacing the SendKeys line with

    Me.SubformName.SetFocus

    where SubformName is the name of the subform as a control on the main form.
    This is not necessarily the same as the name of the subform in the database window; open the main form in design view and click once on the subform to see its control name.

  3. #3
    Star Lounger
    Join Date
    Apr 2002
    Location
    Onekama, Michigan, USA
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SendKeys with Vista (Access97)

    Thank you very much Hans. That did the trick.

    Ron

Posting Permissions

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