Board index » delphi » How to position on a DBLookupComboBox again?

How to position on a DBLookupComboBox again?

Can anyone tell me how to position or display a value in a
DBLookupComboBox
, for example i want to edit an order in my Orders Entry form, i have an

agent DBLookupComboBox to display all the agents names, i save the Agent

Number value in my Orders table and even i locate that record on the
agents table , i can't display the name in the DBLookupComboBox when i
show the form to edit the order.I had linked the AgentsCombo to a query
and it's active, i'm not using cached updates.

How can i do that ?.

 

Re:How to position on a DBLookupComboBox again?


Damin Enrique Cabrera Toledo wrote:

Quote
> .. Number value in my Orders table and even i locate that record on the
> agents table , i can't display the name in the DBLookupComboBox when i
> show the form to edit the order.I had linked the AgentsCombo to a query
> and it's active, i'm not using cached updates.

> How can i do that ?.

 Try, into OnShow event

    LookupComboBox.EditText := ' ';

that will clear only the text exhibited.

Eustakio.

Re:How to position on a DBLookupComboBox again?


Your DBLookupComboBox field has properties of DataSource and DataField. Set
the DataField value of that data source to the value of your agent ID and
the list will display the proper name string.

Damin Enrique Cabrera Toledo wrote:

Quote
> Can anyone tell me how to position or display a value in a
> DBLookupComboBox
> , for example i want to edit an order in my Orders Entry form, i have an

> agent DBLookupComboBox to display all the agents names, i save the Agent

> Number value in my Orders table and even i locate that record on the
> agents table , i can't display the name in the DBLookupComboBox when i
> show the form to edit the order.I had linked the AgentsCombo to a query
> and it's active, i'm not using cached updates.

> How can i do that ?.

Other Threads