Subject Problem with incremental searching
Author Salvatore Besso
hello all,

IBO 4.3Aa and Delphi 7.1 Pro.

I'm trying to implement incremental searching into some TIB_LookupCombo's but
I'm facing some problems.

I want to have incremental search into a lookup query. Suppose that the main
query (on table ANAGRAPHICS) is connected to an anagraphic table and the lookup
query (on table PROVINCES) shows the abbreviations of the provinces and the
relevant field name in this table is SHORT_NAME. Take this short list of
provinces as an example:

RA
RE
RI
RO
RM
RN
.....

First of all I have defined these properties in the lookup query connected to
PROVINCES:

OrderingItemsNo = 1
OrderingItems = SHORT_NAME=PROVINCES.SHORT_NAME;PROVINCES.SHORT_NAME DESC
OrderingLinks = SHORT_NAME=ITEM=1

The TIB_LookupCombo connected to this table has:

SearchKeyByKey = True
SeekNearest = False

Suppose that I want to locate RE. The lookup combo is actually empty (nothing
selected yet). I start to type:

R

and what appears in the lookup combo is

R RA

where RA has a blue background and the R letter that I typed as a green
background (I'm in insert mode). There is a space between R and RA.

I continue to type the letter E and what I observe in the combo is

RE RA

with the same colours and space described above. Useless to say that at this
point nothing useful has been selected from the PROVINCES table and the only way
to get rid of this is to repeatedly press backspace to eliminate what I have
typed, until only RA remains in the lookup combo, but it's not what I wanted to
select. Furthermore, activating incremental search for the lookup combo has
revealed another collateral effect. If I drop down the list after having tried
with incremental search and something is shown in the combo, I am no longer able
to select anything in the list. Even if I click on a different province in the
drop down list the new selection is not enforced and RA remains displayied. If
the lookup combo is empty I can select an item from the drop down list, but then
no further selections are possible. If I remove all ordering... properties from
the query the drop down list starts to work again.

What am I missing?

Thank you
Salvatore