Finding Record in List Box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to search for a record in an unbound list box using an unbound
text box and command button on a form? I have approximately 1000 records in
the list box and would like to use a search string with the Like character to
narrow the search, rather than scrolling through all of the records. I am not
sure if I can clone the recordset and use the Find method on a list box.

Thank You. Skennelly
 
Actually, even though you see the rows in your listbox, they really are in
the underlying table(s).

You could write a query that uses the same source as your listbox, but adds
the criterion, in the designated field, of:

Like Forms!YourForm!txtYourSearchTextBox & *

You ARE searching in only one field, right?!
 
Jeff Boyce said:
Actually, even though you see the rows in your listbox, they really are in
the underlying table(s).

You could write a query that uses the same source as your listbox, but adds
the criterion, in the designated field, of:

Like Forms!YourForm!txtYourSearchTextBox & *

You ARE searching in only one field, right?!

--
Good luck

Jeff Boyce
<Access MVP>

character am

HI,

I was using the same, but which event should i use if want it to search on
change,? I used the onchange event and a requery, but the cursor in the
textbox don't let me type a second character.

Thnx

J
 
If you have a command button, why are you using "OnChange"?

Jeff Boyce
<Access MVP>
 
Jeff:

Thank you for your help. I was able to complete the task as you explained
it. I appreciate it.

Skennelly
 
Jeff Boyce said:
If you have a command button, why are you using "OnChange"?

Jeff Boyce
<Access MVP>

are

Isn't that better to use? Also how should i search for records if i use more
than one field?
 
Jason

I'm not sure what other settings you might be using that would prevent more
than one character in your textbox.

If you are setting up a multi-field "search" form, take a look at the
mvps.org website, and search at Google.com on this topic. There's a lot
already written on it.
 
Back
Top