Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB-Aware

Lost Password?

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-12-2001, 09:58 PM
FancyFace FancyFace is offline
Senior Member
 
Join Date: Jun 2001
Posts: 134
Default Help Please : TDBLookupListbox Question ?

Hi All,

I have a TDBLookupListbox that I would like to have filled at runtim. Actually, I have a button on a form and when the button is clicked,it should fill the TDBLookuplistbox with the lookup values. If I set the ListSource, ListField and Keyfield at design time it works fine. The code I use at runtime is :

lookuplistbox.listsource := SourceName;
lookuplistbox.listfield := DataModule.TableName.FIELDBYNAME('field name').AsString;
lookuplistbox.Keyfield := DataModule.TableName.FIELDBYNAME('field name').AsString;

Say for instance the first value of the fieldname is RWI,
the error would be: lookuplistbox: Field 'RWI' not found

I don't know what is wrong, Any help will be appreciated !
By the way, I use Delphi 4.

Thanks
Christiaan
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:18 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.