Results 1 to 15 of 15
  1. #1
    Join Date
    Mar 2004
    Posts
    42

    Unanswered: Search in Listbox

    I am trying a search function in a listbox but don't know how to implement it. The listbox name is lstList with few column and one column is name [Index#]. On the same listbox I have a combo box name cboIndex. When I type the index number which list the Index #, after update, I want the listbox to filter the corresponding index on the combo box, if the index does not exist the message should say "Index not on the list". Any help will be appreciated.

    Thanks,

    ESM

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    What is the recordsource for your listbox, and combobox?

    You can filter the listbox and then evaluate rowcount for 0 to display the message.

  3. #3
    Join Date
    Mar 2004
    Posts
    42
    This is the recordsource for the listbox:

    SELECT TBLINVENTORY.[Index#], TBLINVENTORY.RevNumber AS [Rev #], TBLINVENTORY.CategoryCode AS [Cat Code],
    FROM TBLINVENTORY

    For the combobox the recorsd source is:

    SELECT TBLINVENTORY.[Index#] FROM TBLINVENTORY

    How do I implement the filter then after selecting the index number from the combo box to the listbox.

    Thanks,

    ESM

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Judging from the record sources in your query, I see no physical way that there could be an index# in your combo box that doesn't exist in your listbox. They're both pulling the same information.

  5. #5
    Join Date
    Mar 2004
    Posts
    42
    I guess I am not making myself clear. The combobox is pulling the list from the same table as the listbox. I just want the user when they type the index #, if existing, to filter or show the corresponding information of the index on the listbox.

  6. #6
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    Originally posted by esm
    I guess I am not making myself clear. The combobox is pulling the list from the same table as the listbox. I just want the user when they type the index #, if existing, to filter or show the corresponding information of the index on the listbox.
    The query RecordSource of the ListBox must have a criteria based in the select item of the combo box.
    That is the way.
    Saludos
    Norberto

  7. #7
    Join Date
    Mar 2004
    Posts
    42
    I attached the file for your review. Two things I want to accomplish on this DB. When I select an index number form the combo box, I wanted the selected index to go to the listbox and go to that record or filter the listbox based on the selected item on combobox. Thanks for any help.

    ESM
    Attached Files Attached Files

  8. #8
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    Originally posted by esm
    I attached the file for your review. Two things I want to accomplish on this DB. When I select an index number form the combo box, I wanted the selected index to go to the listbox and go to that record or filter the listbox based on the selected item on combobox. Thanks for any help.

    ESM
    I need the base in Access 97 format . I have Access 97...ok
    Saludos
    Norberto

  9. #9
    Join Date
    Mar 2004
    Posts
    42
    I don't know what you mean, but the Database is in Access 97 format.

    Thanks,

    ESM

  10. #10
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    Originally posted by esm
    I don't know what you mean, but the Database is in Access 97 format.

    Thanks,

    ESM
    Ok I see what i can do an send to you the base with the update when i finish.
    Saludos
    Norberto

  11. #11
    Join Date
    Mar 2004
    Posts
    42
    Looking forward to your reply. Thanks for all the help Norberto.

    ESM

  12. #12
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    Originally posted by esm
    Looking forward to your reply. Thanks for all the help Norberto.

    ESM
    Ok... Is do it.
    I send your base with the Update.
    I hope this help you.
    Attached Files Attached Files
    Saludos
    Norberto

  13. #13
    Join Date
    Mar 2004
    Posts
    42
    Thanks, I have downloaded the file and I will take a look tomorrow and will let you know if it works or not. It is getting late here. Anyway, I appreciate all your help and patience.

    Thanks,

    ESM

  14. #14
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    465
    Originally posted by esm
    Thanks, I have downloaded the file and I will take a look tomorrow and will let you know if it works or not. It is getting late here. Anyway, I appreciate all your help and patience.

    Thanks,

    ESM
    I send to you another version of the Sample in first version I filter the list box with the item select in the combo box, in this version i select in the listbox the item select in the combo box, is better....
    Now you have the two way....
    I hope this Help you..
    Attached Files Attached Files
    Saludos
    Norberto

  15. #15
    Join Date
    Mar 2004
    Posts
    42
    Thank you very much! I can used both sample to implement on my database. You're the man.

    Thanks,

    ESM

Posting Permissions

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