0

An Access 2016 ListBox control has 10 items, only 1 showing at a time. My Goal: when the user scrolls up/down using the scrollbar arrows, I would like the item displayed to be automatically selected without the user directly clicking on the item (via an event handler).

The scrollbar action does not appear to be captured by any ListBox Event. While the On Got Focus event will capture the first mouse click on the scroll buttons, subsequent clicks on the buttons do not trigger any control event.

I do understand that I can create custom up/down buttons to simulate the scrollbar actions, but I prefer to use built in routines.

Am I correct to conclude that the scrollbar events are handled by the Windows event handler, not Access?

0

There is no such event handler available in Access. Access controls are very limited compared to, for example, the .Net counterparts or other development environments.

I can't disagree with using "built in routines", but even if the scrollbar did expose more events, you'd still be trying to force the listbox to behave in a non-standard way. Especially in Access you'll have better luck implementing something with specialized buttons as you've already mentioned.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.