Board index » delphi » choose selected item in a llookuplistbox on a form , progmatically

choose selected item in a llookuplistbox on a form , progmatically

O.k. I have a lookuplistbox on a form. The listbox is displaying data
from one table and setting data with another table via datafield and
datasource. When the form appears i can set values in the table via data
field and all is good. But how do i take said data from same field to
set the properties of the same lookuplist. I can set data from
lookuplist as stated above but how do i set the lookuplistbox.

ive tried(this is soudacode)..
locate('studid',table1.fieldbyname(studid).asinteger,[]);
lookupbox.keyvalue := table1.fieldbyname(studid).asinteger;

.. but it gets a varient type error down the line.

Whats the best way to choose which item from a table gets displayed. Is
there something im not seeing, i know there has to be a way to do it.
Any ideas will be welcomed.

thanks

 

Re:choose selected item in a llookuplistbox on a form , progmatically


Quote
GAWS <G...@OPTONLINE.NET> wrote in message <news:3BE36251.5080407@OPTONLINE.NET>...

> locate('studid',table1.fieldbyname(studid).asinteger,[]);
> lookupbox.keyvalue := table1.fieldbyname(studid).asinteger;

> .. but it gets a varient type error down the line.

There's no problem - you need not set value in lookuplistbox, simply
set value in the table

Other Threads