Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    Auto is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2013
    Posts
    60

    Hitting Ctrl To Multi Select from ListBox

    hi all.

    i am having a form that has a listbox, which brings up a lot of records, and the user may choose multiple records, but when user wants to scroll down the page to multi select, he cant do it with the ctrl keyboard button, when he press ctrl the page jumps back up, is there any workaround for that?

    thanks.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I have never had a problem using Ctrl and Shift with Multiselect Listboxes. Out of habit, I never hold the control key down for an extended period of time. If I am scrolling, I am probably not holding the control key. I do not recall a listbox jumping to the beginning because of hitting the Ctrl Key.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,633
    Cannot replicate issue. Ctrl key actually does nothing in my test.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    Auto is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2013
    Posts
    60
    ok, i think there is maybe missing some points, there is two scrollbars, one is for the form itself, and one is for the listbox, the scrollbar on the listbox works fine, the scrollbar on the form itself makes the problem, and thats when i press the ctrl button the scrollbar from the form moves to the center and i cannot get it to the bottom at the same time of pressing ctrl to multiselect from bottom list.

    to get it done, you need to have a form with a listbox in it, which should be big enough that it should need a scrollbar for the form, and then you should have the row source query recrds from a table with enough results that the listbox should get a scrollbar.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,633
    I have tried using Ctrl key and in my experience it does nothing. Discontinuous records cannot be selected in a form. The Shift key will allow multi-select of continuous records.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    Auto is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2013
    Posts
    60
    ok, i tried a different approach, forget about the listbox, having just a form which has a scrollbar, if i hit ctrl or alt or if i press shift i get the same thing the scrollbar sets itself in middle. any idea why?

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,633
    I do not get that behavior.

    Is this happening in a subform?

    If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    Auto is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2013
    Posts
    60
    ok, i was wrong, i tested now a new form without a listbox and its not happening. that proves that something is wrong in my listbox.

    so let me try to be more specific what the form is doing maybe there is something you can come up with. (i think its because its somehow setting focus on the listbox)

    i have a main form which is called main, that form is just buttons which the user gets as a frontend to start with.
    in the form main there is a button called transactions, on click it opens a form called phonenumber.
    the user needs to enter a phone number to lookup the customers invoices, when user enters the phone number, there is a listbox where he gets all invoice numbers purchased by that customer, when user choose on invoice from listbox there is a ok button, and on click it sets some global variables needed for the later process, and the it opens up another form called Transactions, and the current form closes.
    the form Transactions has a Form_load event. which sets some controls on the form visible or not based on some global variables, and its having a few SQL querys in it and based on some global variables the RowSource is being set to the SQL string appropriate.

    hope it gives some light here.

  9. #9
    Auto is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2013
    Posts
    60
    Quote Originally Posted by June7 View Post
    If you want to provide db for analysis, follow instructions at bottom of my post.
    i need to delete all info from the tables, will it still help?
    also, if i upload my db, can i take it down later it should not be public?

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,633
    Some data will be needed for testing the behavior. Doesn't have to be real data.

    After a time, I think members cannot edit posts but moderators can.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    Auto is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2013
    Posts
    60
    ok here is a test db

  12. #12
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,633
    Which form has the issue - Transactions? There is no data in the listbox. The combobox RowSource SQL has static criteria for a phone number that doesn't exist. Even after removing the filter, no records show in listbox which is odd because the query does show records. Had to create a new listbox with the same properties.

    Cannot test the original listbox - suspect it is corrupted.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  13. #13
    Auto is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2013
    Posts
    60
    i tested myself now again with the test db, and its working, could it be that its because you use a different version access?

  14. #14
    Auto is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2013
    Posts
    60
    you need to press the button look up transaction on the main form, that will populate the phone number form, then it should be there 2 phone numbers, choose one, and it will bring up the invoice in the listbox, then choose all, and press view, should work, and it will populate the Transaction form, over there i am having the issue.

  15. #15
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,633
    Okay, I get it now, form Load event code is setting the listbox RowSource.

    So I just followed your instructions and the correct records display.

    However, the Ctrl key does nothing.

    I would not expect the Access version to make a difference but not impossible.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Multi-Select Listbox
    By RayMilhon in forum Forms
    Replies: 5
    Last Post: 03-04-2014, 11:54 AM
  2. pbaldy - Multi-Select Listbox
    By jasbrown in forum Forms
    Replies: 9
    Last Post: 01-31-2013, 11:22 AM
  3. Search using a multi select listbox
    By noobaccess in forum Access
    Replies: 13
    Last Post: 12-04-2012, 07:06 AM
  4. multi select listbox
    By crowegreg in forum Forms
    Replies: 3
    Last Post: 07-28-2012, 01:48 PM
  5. Looping through a multi select listbox - how do I do it?
    By shabbaranks in forum Programming
    Replies: 4
    Last Post: 04-02-2012, 11:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums