Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Jan 2003
    Location
    Grass Valley, California, USA
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Keyboard scroll listbox (2000)

    If focus is on a form listbox, is there any method of recognizing (or defaulting the use of) the "PgUp", "PgDn" and the up- and down-arrow keys for vertical scrolling in the listbox?

    All I have been able to use for listbox scroll is the mouse-click in the vertical scroll-bar.

    Thanks, Jim

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

    Re: Keyboard scroll listbox (2000)

    I don't understand: if the list box has the focus, the default action of Up Arrow, Down Arrow, Page Up and Page Down is to change the selected item, scrolling the list box if necessary. What happens on your system?

  3. #3
    Star Lounger
    Join Date
    Jan 2003
    Location
    Grass Valley, California, USA
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Keyboard scroll listbox (2000)

    Well Hans, you caught me <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15> ... I had thought the listbox had the focus, and therefore could not understand why the keys didn't work. When I went back to verify, I found that, indeed, it did not have the focus, and when the focus was properly placed, all works exceedingly well.

    Thanks, Jim
    (Sometimes the "bug" in the red hunting jacket is the hardest to see...)

  4. #4
    Star Lounger
    Join Date
    Jan 2003
    Location
    Grass Valley, California, USA
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Keyboard scroll listbox (2000)

    Hans,
    I spoke too soon. When I force the focus to the listbox (Me.lstBox.SetFocus), the dotted lines surround the first list entry, indicating focus on the list. However, the PgDn-key doesn't work at all at this point, and the down-arrow key doesn't work on the first keystroke, but does begin working on the second and subsequent keystrokes. To further complicate the issue, after the first down-arrow keystroke (which doesn't move the dotted line highlight), the PgDn-key also begins to work.

    What's going on here? Is there a way to get the keys to operate immediately on the first keystroke?

    -- Jim

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

    Re: Keyboard scroll listbox (2000)

    Sorry, I can't reproduce that. I'm using Access 2002, perhaps the behavior has changed. If I set focus to a list box using code, the arrow and PgUp/PgDn keys work immediately.

Posting Permissions

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