List box problem (1 Viewer)

  • Thread starter Thread starter STeeLGuT
  • Start date Start date
S

STeeLGuT

Guest
Hi, I am trying to enter a name in a text box and as I enter the name I would like the List Box to display a list of names that have letters that are the same as what I have typed so far.

Tho

Thompson
Thorton

Thor

Thorton

I can enter parameter value, but I want to just type in the form.

SELECT [Table1].[LastName] AS LastName, [Table1].[Address] AS Address
FROM Table1
WHERE [Table1].[LastName] Like Form1.Text29.[*];

Could anyone tell me a way to fix it?
Thanks
 
Hey, thanks a lot, with much effort, I am sure I will figure out how to get it into my project.
 
Here is another sample that might help move you along. The attached file demonstrates how to dynamically fill and filter a listbox using saved queries and the listbox's handy rowsource property.

Additionally, it shows how to set up a form so that the user can click a checkbox (in an option group) to filter on different fields in a table. The sample also demonstrates how to use the contents of a textbox on a form as criteria in a saved query. Finally, the code demonstrates how to discover which item is chosen in an option group. The Suppliers table from the Northwind database (a sample database file that ships with Access) is used as a datasource.

From the Start form, click the Demo button. On the search form that pops up, begin typing in the Search Box -- "N" is a good letter to start with...

Regards,
Tim
 

Attachments

Last edited:
It went right into debug, but I will look at the included DB, thanks.
 
Sorry -- another try; one file saved in Access 2000 format, the other converted to 97.

Regards,
Tim
 

Attachments

Interesting word search [filter] technique Tim.
 
Thanks for the feedback. I presume it's not throwing an error for you, then -- which is good.

Regards,
Tim
 
I opend the libx2K.zip file with Access 2003 and it worked fine.
 
I know this thread is old, but for A2K3 there is an auto-correct option for a combobox. You don't need any other functions... I'm not sure about the older versions of Access, but just letting newer users know that this post shouldn't apply to them.
 

Users who are viewing this thread

Back
Top Bottom