[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 484
  • Last Modified:

dblookupcombobox

hello.............well I have a problem.....I have done
a query and the datasource is linked  the Tquery is linked
and my dblookupcombobox is linkede......well
qhen I do the query the rows are on the dblookcombobox but it doesn't
show its autimatically..is there any property or method that makes the dblookuocombobox
to show the rows that i have without the event CLICK
I said ..........some like automatillac selection on the first row

ok bye I hope your reply
0
Iamme
Asked:
Iamme
1 Solution
 
IammeAuthor Commented:
Sorry
but I don't speak english very well as you
have seen
0
 
ZifNabCommented:
mmm, can you give more information?

Which information have you put in DBLookUpComboBox:

DataField, DataSource

KeyField, ListField, ListSource

Zif.
0
 
kretzschmarCommented:
agree with zif, more info please

if you want a preselect just set the keyfieldvalue as required

meikl
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Michael_Benjamin_PerezCommented:
Hi Iamme,

I think I know what you mean, try doing this after you've opened the query:

if DBLookupCombobox.KeyValue = Null then // Only fill when it is empty
  DBLookupCombobox.KeyValue := DBLookupCombobox.ListSource.Dataset.FieldByName(DBLookupCombobox.KeyField).AsInteger;

It think this should do it. Make sure the keyfield is of type integer!

It probably is...

Cheers mate

Mick
0
 
Michael_Benjamin_PerezCommented:
I've reread your question, you offcourse can also stick in a DBLookupCombobox.ListSource.DataSet.First before my little code snippet.

G'Luck, Mick
0
 
FreakyCommented:

You should set the "listsource" and "listfield" properties to let the combobox show the lines from your query.

Also be sure that the "normal" settings are correct (datasource/datafield)

the data in the "keyfield" is used for the "lookup"

Greets

 Sascha
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now