Board index » delphi » TDBComboLookup problem

TDBComboLookup problem

Cheers,

I am using a DBLookupComboBox and it works fine, except that I cannot get
it to start up with a default (the first dbase record) value. Now it is
just empty before I select a record. I have tried to move the table to
the first record, set the keyvalue and stuff to default values but
nothing seems to help. Can anyone help me?

TIA,

Michel

--
 ._______________________________________.
 :      H e a t W a v e  M u s i c       :
 | http://olohof.et.tudelft.nl/heatwave  |
 |           _____           _    ___    |
 |          /  |  \__  ____ / /  / | \   |
 |         _\  '  /  \/  | /  _|/  '  \  |
 :________/  \   /  O \  '/  | \   .   \_:
 '        \_____/\____/\__\____/___|   / '
        mailto:yo...@c64.pantsorg  |__/

     ^Drop "pants" before replying!^

 

Re:TDBComboLookup problem


Set the ItemIndex to 0 after initialising it.

Nick Gabb

Quote
youtH wrote:

> Cheers,

> I am using a DBLookupComboBox and it works fine, except that I cannot get
> it to start up with a default (the first dbase record) value. Now it is
> just empty before I select a record. I have tried to move the table to
> the first record, set the keyvalue and stuff to default values but
> nothing seems to help. Can anyone help me?

> TIA,

> Michel

> --
>  ._______________________________________.
>  :      H e a t W a v e  M u s i c       :
>  | http://olohof.et.tudelft.nl/heatwave  |
>  |           _____           _    ___    |
>  |          /  |  \__  ____ / /  / | \   |
>  |         _\  '  /  \/  | /  _|/  '  \  |
>  :________/  \   /  O \  '/  | \   .   \_:
>  '        \_____/\____/\__\____/___|   / '
>         mailto:yo...@c64.pantsorg  |__/

>      ^Drop "pants" before replying!^

Re:TDBComboLookup problem


With Paradox this is what I do:
DBComboBox.KeyValue := TableField.Value;

--
Later,
Lewis Howell
-??-STm-lewishow...@yahoo.com

Quote
youtH wrote in message ...
>Cheers,

>I am using a DBLookupComboBox and it works fine, except that I cannot get
>it to start up with a default (the first dbase record) value. Now it is
>just empty before I select a record. I have tried to move the table to
>the first record, set the keyvalue and stuff to default values but
>nothing seems to help. Can anyone help me?

>TIA,

>Michel

>--
> ._______________________________________.
> :      H e a t W a v e  M u s i c       :
> | http://olohof.et.tudelft.nl/heatwave  |
> |           _____           _    ___    |
> |          /  |  \__  ____ / /  / | \   |
> |         _\  '  /  \/  | /  _|/  '  \  |
> :________/  \   /  O \  '/  | \   .   \_:
> '        \_____/\____/\__\____/___|   / '
>        mailto:yo...@c64.pantsorg  |__/

>     ^Drop "pants" before replying!^

Other Threads