Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Oct 2006
    Location
    Virginia, USA
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Searching a List Box (2002)

    I have a form with an extended multi-select list box displaying a list of students (along with their ID #, grade, and status). Users are currently able to select one ore more students by clicking on each student and holding the shift or control keys. They are also able to type the first letter of the last name to automatically select the first student with a last name beginning with the typed letter. However, since there are a few thousand students in the list, they would like to be able to continue typing each letter in the student's last name until the correct student is selected. Is there any way to do this? Perhaps I need to use a subform instead, but if so, I can't figure that out either.

    Tiffany

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

    Re: Searching a List Box (2002)

    Access doesn't provide the functionality you want for list boxes. It does for combo boxes, but you can't select multiple items in a list box.
    You could use a combo box to select a student, with a command button to add the selected student to a list box.

  3. #3
    New Lounger
    Join Date
    Oct 2006
    Location
    Virginia, USA
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Searching a List Box (2002)

    Okay, I can do that, but can you help me a little. My combo box contains 4 columns (ID, Name, Grade, and Status). I am able to add the selected student to the listbox, but I can only get one field/column to display. I would like the listbox to display all four columns, but at the very least, the name and ID. Seeing the student's name would help the users to remember who they have already selected, but the ID number is required because it is used to pull the records. Is there a way to add items to the list with multiple columns?
    Tiffany

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

    Re: Searching a List Box (2002)

    The AddItem method (introduced in Access 2002) only supports populating a single column. You'd have to create a temporary table to act as row source of the list box. I think it'll be much easier to user your original version and to live with the limitation that users can only enter the first letter of an item.

  5. #5
    New Lounger
    Join Date
    Oct 2006
    Location
    Virginia, USA
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Searching a List Box (2002)

    I agree with you; thanks for your help!
    Tiffany

Posting Permissions

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