searching combobox by a letter

sarab99

Registered User.
Local time
Today, 18:18
Joined
Mar 23, 2009
Messages
10
Good day experts

I am a newbie in MS Access and I would like to make a combobox that searching its contents by enter any letter. for example if I want to find China I enter "ina" or "hina" or event on letter "n"

I appreciated if any expert can update my attached databse file to my request.

Thank you for your assistance. :)


.
 

Attachments

I'm reasonably certain that this is not possible with a standard combobox. Like 99.9999%
 
The Cool Search Tool in this thread, will do what you are looking for.
 
Mr. John, this not mach my required.

Any help please ?
 
¿Qué

You want to match on any part of your search phrase. For example you want your user to be able to input any part of "China" and get a result. This is exactly what the cool search tool, I linked to above, does. How does it not meet your requirements?
 
Mr. john the linked you gave me belong to listbox what I am loking for is for combobox.

I need the result to show in the combobox that I have search in.
 
can you use a textbox instead? because it is much simpler to achieve what you're looking for i.e.

Like "*" & "your search string" & "*"
 
Mr. john the linked you gave me belong to listbox what I am loking for is for combobox.

I need the result to show in the combobox that I have search in.

Whilst the example I linked to outputs it's results to a list box, it would be a simple matter to adapt the same principal to output to a combo box rather than a list box.
 
a combo box refines it search based on characters entered left to right

if you want something that scans the text and finds matches to a given string, then you have to roll your own functionality to do this.
 
Can any one updat my file in first post? I dont know how to do it !
 
try this - just click in the field, and press F3

if its the key column, just search, otherwise, search as formatted.

although this will find records in the table, where the combo box selection is equal to your search string

what it wont do is change the behaviour of the combo box.

----------
thinking again - why do you want to search for hina, rather than China? - is it becuase you dont know whether its capitalised or not? If so, it doesnt matter - access doesnt distinguish between upper and lower case.
 
As far as I'm aware, combo boxes will only gues what the rest of the word is... like predictive text.

I dont think it will guess the rest of the word.

It's useful to a certain extent, like if you pressed C, then H... CHINA would be instantly highlighted...

I dont think you could use a combo box in the way you suggested. I have been having trouble with search tools myself and have just managed to figure it out.

The thread John Big Booty referred to is one I worked with and it seems to do what you want, i.e. you enter INA... and everything with INA will appear.

The search code:
Code:
Like "*" & [Forms]![FormName]![CONTROL] & "*"
comes to mind :)
 
Dear Chrisopia, could you please explain where to put this code ?

thank you
 
I use a query,

if the table had for example a column for countries, I would place it under this, and this would search through countries to find it.


the complete code would source the code of the search box, e.g.

Like "*" & [Forms]![FormName]![SEARCH CONTROL] & "*"
This would then use the query to filter what ever is in the search box.

Hope this helps.

Ill be back online tomorrow and ill give you a sample of my search tool.
 

Users who are viewing this thread

Back
Top Bottom