Results 1 to 9 of 9
  1. #1
    Lounger
    Join Date
    Jan 2006
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Search text (Access 2000)

    I have tried to use the suggestion for searching a text made in the thread 537634 but i got the error called " you entered an expression that has an invalid reference to the recordset property ".I am applying the attachement.Can you help me find a way of an easy searching where by writing one letter the names round it appear?

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Search text (Access 2000)

    For a start the form does not have a recordset for which to reference a recordsetclone.

    Just what is it you are trying to do?

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

    Re: Search text (Access 2000)

    The search code is meant to be used in a form bound to a table or query. It locates a record based on the text you enter in the text box.
    Your form is unbound, so there are no records to search for.

  4. #4
    Lounger
    Join Date
    Jan 2006
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Search text (Access 2000)

    Do you mean that in my case it is not possile to search through the list box? My problem only is that the list with the customer names is too long. If so then i should give up this application.What about the Find function ?

    regards

    canett

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

    Re: Search text (Access 2000)

    As I wrote, the code you have can only be used to find a record in a bound form. It can NOT be used to find an item in a list box.

    It is possible to write different code to find an item in a list box, but since your list box is multi-select, it is not clear what you want it to do. What if the user has already selected some items. What should happen when the user types in the text box? Should the selected items be deselected? Or do you want to keep the selection?

  6. #6
    Lounger
    Join Date
    Jan 2006
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Search text (Access 2000)

    Thank you for the reply.I want only to find more easily items in the list.After i have found the items,to stop there and change the color on this item. After that i do not need the selection any more. I can now double click on the selected item thus removing it out of the list, and deselect.Or i can give up the idea, start searching again which means i should deselect at this moment too.
    In two wrods, i do not need to keep the selecton after i have selected.

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

    Re: Search text (Access 2000)

    You'd have to delve into the inner workings of the listbox code you got from the Access 2000 Developer's Handbook.

  8. #8
    Lounger
    Join Date
    Jan 2006
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Search text (Access 2000)

    Thank you.Your explanations have convinced me that using this application is not the best idea,at leat for myself

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

    Re: Search text (Access 2000)

    Searching in a multi-select list box doesn't work well, anyway: the list box won't scroll to the selected item. It does work in a single-select list box. I have attached a small demo that uses a list box whose row source is a table.

Posting Permissions

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