Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926

    Unanswered: Enable scroll in a listbox

    I have a request by a user to use the scroll button on the mouse so it can be used when they click in a listbox (so it will scroll through the listing in the listbox without having to click the right sidebar in the listbox) (ie. the scroll button only scrolls through the recordset on the form.)

    Does anyone have any sample code on this or know how it can be done?
    Last edited by pkstormy; 08-31-07 at 19:20.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  2. #2
    Join Date
    Jun 2007
    Location
    Maitland NSW,Australia
    Posts
    388
    Paul

    Using the Got Focus event of the combo box in put this code me!<combo box name>.dropdown e.g. Me!selected_skill.Dropdown
    When the user moves to the field the listing is displayed and the user can then scroll to the selected entry.

  3. #3
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Thanks for the reply Poppa Smurf but it's a listbox, not a combo box. I can't use the .dropdown with a listbox. Out of curiosity I tried the code with a combo box to see if it would enable the scroll button to scroll through the listing but it still doesn't allow me to scroll through the listing, even in the combo box (it just expands the dropdown).
    Last edited by pkstormy; 08-31-07 at 19:23.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  4. #4
    Join Date
    Jun 2007
    Location
    Maitland NSW,Australia
    Posts
    388
    Paul

    I created a listbox, after I gave the list box the focus by placing the cursor on list I was able to scroll through the list.

  5. #5
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Poppa Smurf - you're right! I just tried this at home and your 100% correct. Even the combo box let's me scroll using the scroll button on the mouse.

    There must be something about MSAccess at work which differs from mine at home (even though both are MSAccess 2000.)

    It doesn't work on any of the computers at work. Thank you very much for testing this out and letting me know! - it prompted me to try it at home again to see that it works like you said. Now you got my curiosity going why it works at home and not at work. I'm thinking it might be a mouse configuration setting (or some setting in Access itself.)

    Thank you again!
    Last edited by pkstormy; 08-31-07 at 22:44.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  6. #6
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178

    Here's another problem for ya...

    Paul,

    I figure it must be something to do with the mouse. However, I have a slightly different question. Why does my mouse scroll button work in a report/form in design mode, and in IE (such as this screen), but confound it! It doesn't work in the VBA editor? Is that also a mouse eek?

    Sam

  7. #7
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Good question Sam. I'm going to do some more research on the scroll button Tuesday when I get back to work. I'll post what I find and hopefully it will answer both of our questions.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  8. #8
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10

  9. #9
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Jezz - Did I double-post this?? Wierd, I posted it at 20:21 which means I was at home and probably forgot that I posted it from home when I posted it at work the next day - true signs of needing a vacation . Sorry that I did that George. I really don't recall making the post from home.

    Regardless, thanks for the link to my other post George. I won't remove my dup post to save the coding you supplied for future use. The problem is that the mouse scroll works for a listbox/combobox without any coding on my computer at home (with Access 2000). Here at work (with Access 2000), it does not. The part I'm trying to figure out is why it might work at home and not at work without any coding. I'm thinking there is a scroll setting somewhere.
    Last edited by pkstormy; 09-04-07 at 12:38.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  10. #10
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    The code works if focus is on the form detail... :'(
    I'll try have a proper look at it tonight at home
    George
    Home | Blog

  11. #11
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I have MSAccess 2003 installed through VMWare (here at work) and the scroll works fine that way. For some reason though (here at work) MSAccess 2000 (non-vmware) doesn't want to recognize the scroll for a listbox/combobox. At home my MSAccess 2000 works fine with the scroll in a listbox. I thought it might be a mouse setting but there must be something about the MSAccess 2000 installation/setup here at work. It could also be due to some different apps installed as my vmware session only has MSAccess 2003 installed. If this is the case, it could be due to dozens of different installed apps.

    I'm guessing it will work fine for you at home George. I think it's limited to something about our setup and MSAccess 2000 here at the city.
    Last edited by pkstormy; 09-04-07 at 13:25.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  12. #12
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    Paul,

    Have you tried it in your VBA editor, both at work and at home?

    Sam

  13. #13
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    No - the scroll button doesn't work in the VBA editor (in either MSAccess 2000 or the vmware-MSAccess 2003.) But I don't really use it in the VBA editor. Does the scroll button work in your VBA editor Sam? I use it at work here for IE, Word, Excel, etc.. but I never really paid attention to it working in the VBA editor.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  14. #14
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    No, Paul, it doesn't work either at work (A02) or at home (A03). It bothers me, because I rely heavily on VBA to do all my legwork programatically, which translates to a lot of code, and I can't scroll through it with the wheel. I find the wheel considerably more convenient than the scrollbars for some reason. I guess I'll have to learn to live with it.

    Sam

  15. #15
    Join Date
    Jun 2007
    Posts
    74

    Scrolling in the VBE

    The scroll wheel will not work in the VB Editor because Microsoft decided that it did not need to. I don't think this was fixed until Office 2007. There is a program called VBScroll that you can download and install from:

    http://www.softpedia.com/get/System/...VBScroll.shtml

    I have been using this program for years and it works regardless of your office version. But you don't need it if you have Office 2007.

    Alternatively you can look at the Microsoft Support site for another solution (which I have not personally used):
    http://support.microsoft.com/?id=837910

    Regards,
    Brent Blevins
    Last edited by Brent Blevins; 09-04-07 at 19:37.

Posting Permissions

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