Searching ListBox as i type in TextBox

Important Notice


Please note that on 14th December 2023 users will experience an expected outage whilst we make upgrades to our network. We anticipate this process may take a couple of hours and so we apologise in advance for any inconvenience.

  • Hi


    I need some help with the code below, it searches the contents of the listbox as I type in the textbox and work fine. However if I miss type and use backspace nothing happens.


    Can some one help me out so backspace works in the search?



    Many thanks in Advance


    AndyW

  • Hello AndyW and welcome to the forum,
    You can just type into the combobox or

  • Hi Pike,


    Thanks for the reply.


    The typing in the ListBox doesn't work as it has 10 columns of data, which are all searchable from TextBox1 this all works fine and as I type it filters the ListBox results.


    But if I hit backspace it clears the text in the TextBox but doesn't update the ListBox and I have to reset the form.


    I really need a code where the backspace will continue updating the results in the ListBox.


    Many Thanks


    Andy

  • Hi Pike


    The list is populated like this:







    Thanks in advance


    Andy

  • Hello,
    try,,,

  • this will be closer to the mark

  • Hi Pike,


    The search now works perfectly thank you.


    But I am now getting a run time error 70 permission denied on the line in red below when I select an item in listbox1



    Do you have any ideas?


    Andy

  • Hello,
    or remove the listbox_change

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!