Solved

dblookupcombobox

Posted on 2000-02-15
6
472 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Virtuailstring tree compare node issue 14 117
Help on project with Soap 10 54
Delphi Form ownership 4 90
drawing animated level bar based on numbers 3 97
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

821 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