Solved

dblookupcombobox

Posted on 2000-02-15
6
474 Views
Last Modified: 2010-04-04
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
Comment
Question by:Iamme
6 Comments
 

Author Comment

by:Iamme
ID: 2523146
Sorry
but I don't speak english very well as you
have seen
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 2523360
mmm, can you give more information?

Which information have you put in DBLookUpComboBox:

DataField, DataSource

KeyField, ListField, ListSource

Zif.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 2524173
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!

 

Expert Comment

by:Michael_Benjamin_Perez
ID: 2524312
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
 

Expert Comment

by:Michael_Benjamin_Perez
ID: 2524316
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
 

Accepted Solution

by:
Freaky earned 50 total points
ID: 2551995

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Intraweb download file link ? 1 168
Working with hours 3 74
LAN or WAN ? 11 106
Delphi: barcode reading on android platform 1 76
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question