PDA

View Full Version : Search any text thru combo box



wasim_sono
06-17-2008, 03:34 AM
Dear All:help

Is it possible to search any text from a table thru a combo box just like MSN or google search box?

I have a table having field of villages. This field has names of villages. The table has about 1000 records and may increased daily basis. I want to make a search option thru which user enter part of the village name.

Is it possible to set criteria in query of combo box like

%&[forms].[searchform].[combo2]

or something else.:bug:

Thanks.

Wasim

Oorang
06-17-2008, 07:19 AM
Hi Wasim,
Because VBA uses VB6 controls, the textbox control does not have an autocomplete feature by default. You can set a combobox's rowsource property to a table and then only allow the user to select from that list. This will be very similar to autocomplete. If you really want to delve into it, there is a work-around posted here: http://vbnet.mvps.org/index.html?code/textapi/shautocomplete.htm
Note, however, that installation of IE5 is required.