Auto complete DBLookupComboBox

1

I have a DBLookupComboBox2 with the following information:

42-batata
45-cebola
78-caneca
49-faca
79-livro

If the number is entered the search is done, but with letters it does not work. For example I want to type "bat" and have already selected the "42-potato" record.

In the KeyPress event I'm querying for whatever typed in DBLookupComoBox. My question is the following is the possibility of appearing inside the component what I am typing, the way I am doing so far if I type "ba" does not appear visually inside the component.

    
asked by anonymous 23.08.2017 / 13:28

1 answer

1

I think the dblookup object will not perform the behavior you want.

But according to the first paradigm of the programmer it says the following: "Good code is one that works"

To resolve this issue you can do SQL as follows:

SELECT concat(cast(id as char(5)),'-' , nome ) as ID_NOME, tabela.*  FROM TABELA

Make the required links in dblookup for the new ID_NAME field and you can get the desired functionality.

    
26.08.2017 / 20:41